diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-01-25 17:07:21 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-01-25 17:07:21 +0100 |
commit | 200a97e64f29dc904961e99bcbc0f20fef431dd2 (patch) | |
tree | 4b8d5c809925320e74efb8c9657037ee6f00d718 | |
parent | fcaa7523d4f37d5b3c4bf459784e826f98252fe8 (diff) | |
parent | 1909431c5b6413c496eb93d3d74be3e3e936951b (diff) | |
download | guix-200a97e64f29dc904961e99bcbc0f20fef431dd2.tar.gz |
Merge branch 'master' into core-updates
77 files changed, 2812 insertions, 488 deletions
diff --git a/.dir-locals.el b/.dir-locals.el index 87cdaae807..03d9a4ec8d 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -18,6 +18,7 @@ (eval . (put 'manifest-entry 'scheme-indent-function 0)) (eval . (put 'manifest-pattern 'scheme-indent-function 0)) (eval . (put 'substitute-keyword-arguments 'scheme-indent-function 1)) + (eval . (put 'with-store 'scheme-indent-function 1)) (eval . (put 'with-error-handling 'scheme-indent-function 0)) (eval . (put 'with-mutex 'scheme-indent-function 1)) (eval . (put 'with-atomic-file-output 'scheme-indent-function 1)) diff --git a/.gitignore b/.gitignore index 09a593e9fa..10b18daa5e 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,4 @@ GRTAGS GTAGS /nix-setuid-helper /nix/scripts/guix-authenticate +/nix/scripts/offload diff --git a/AUTHORS b/AUTHORS index e29545e9d0..6ec176cb9b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -17,5 +17,6 @@ alphabetical order): Aljosha Papsch <misc@rpapsch.de> Cyril Roelandt <tipecaml@gmail.com> Alex Sassmannshausen <alex.sassmannshausen@gmail.com> + Sree Harsha Totakura <sreeharsha@totakura.in> David Thompson <dthompson2@worcester.edu> Mark H. Weaver <mhw@netris.org> diff --git a/Makefile.am b/Makefile.am index 6d6aba059b..16b28eb181 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +# Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> # Copyright © 2013 Andreas Enge <andreas@enge.fr> # # This file is part of GNU Guix. @@ -80,6 +80,13 @@ MODULES = \ guix.scm \ $(GNU_SYSTEM_MODULES) +if BUILD_DAEMON_OFFLOAD + +MODULES += \ + guix/scripts/offload.scm + +endif BUILD_DAEMON_OFFLOAD + # Because of the autoload hack in (guix build download), we must build it # first to avoid errors on systems where (gnutls) is unavailable. guix/scripts/download.go: guix/build/download.go @@ -185,6 +192,14 @@ EXTRA_DIST = \ release.nix \ $(TESTS) +if !BUILD_DAEMON_OFFLOAD + +EXTRA_DIST += \ + guix/scripts/offload.scm + +endif !BUILD_DAEMON_OFFLOAD + + CLEANFILES = \ $(GOBJECTS) \ $(SCM_TESTS:tests/%.scm=%.log) diff --git a/build-aux/hydra/guix.scm b/build-aux/hydra/guix.scm index 57041d695f..3996a0b422 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 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +29,9 @@ ;; newer, even though they may not correspond. (set! %fresh-auto-compile #t) + ;; Display which files are loaded. + (set! %load-verbosely #t) + (and=> (assoc-ref (current-source-location) 'filename) (lambda (file) (let ((dir (string-append (dirname file) "/../.."))) diff --git a/config-daemon.ac b/config-daemon.ac index 0717141198..1169bb6ef4 100644 --- a/config-daemon.ac +++ b/config-daemon.ac @@ -95,6 +95,17 @@ if test "x$guix_build_daemon" = "xyes"; then dnl Check for <linux/fs.h> (for immutable file support). AC_CHECK_HEADERS([linux/fs.h]) + dnl Check whether the 'offload' build hook can be built (uses + dnl 'restore-file-set', which requires unbuffered custom binary input + dnl ports from Guile >= 2.0.10.) + GUIX_CHECK_UNBUFFERED_CBIP + guix_build_daemon_offload="$ac_cv_guix_cbips_support_setvbuf" + + if test "x$guix_build_daemon_offload" = "xyes"; then + AC_DEFINE([HAVE_DAEMON_OFFLOAD_HOOK], [1], + [Define if the daemon's 'offload' build hook is being built.]) + fi + dnl Temporary directory used to store the daemon's data. AC_MSG_CHECKING([for unit test root]) GUIX_TEST_ROOT="`pwd`/test-tmp" @@ -107,6 +118,11 @@ if test "x$guix_build_daemon" = "xyes"; then [chmod +x nix/scripts/substitute-binary]) AC_CONFIG_FILES([nix/scripts/guix-authenticate], [chmod +x nix/scripts/guix-authenticate]) + AC_CONFIG_FILES([nix/scripts/offload], + [chmod +x nix/scripts/offload]) fi AM_CONDITIONAL([BUILD_DAEMON], [test "x$guix_build_daemon" = "xyes"]) +AM_CONDITIONAL([BUILD_DAEMON_OFFLOAD], \ + [test "x$guix_build_daemon" = "xyes" \ + && test "x$guix_build_daemon_offload" = "xyes"]) diff --git a/configure.ac b/configure.ac index 799b3e8152..749672f15b 100644 --- a/configure.ac +++ b/configure.ac @@ -38,10 +38,13 @@ AC_ARG_ENABLE([daemon], # Prepare a version of $localstatedir & co. that does not contain references # to shell variables. -guix_localstatedir="`eval echo $localstatedir | sed -e "s|NONE|/usr/local|g"`" -guix_sysconfdir="`eval echo $sysconfdir | sed -e "s|NONE|/usr/local|g"`" +guix_prefix="`eval echo $prefix | sed -e"s|NONE|/usr/local|g"`" +guix_localstatedir="`eval echo $localstatedir | sed -e "s|NONE|$guix_prefix|g"`" +guix_sysconfdir="`eval echo $sysconfdir | sed -e "s|NONE|$guix_prefix|g"`" +guix_sbindir="`eval echo $sbindir | sed -e "s|NONE|$guix_prefix|g"`" AC_SUBST([guix_localstatedir]) AC_SUBST([guix_sysconfdir]) +AC_SUBST([guix_sbindir]) dnl We require the pkg.m4 set of macros from pkg-config. dnl Make sure it's available. diff --git a/daemon.am b/daemon.am index 60bbaf73ed..1059e444ab 100644 --- a/daemon.am +++ b/daemon.am @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +# Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> # # This file is part of GNU Guix. # @@ -56,6 +56,7 @@ libformat_a_CPPFLAGS = \ libutil_a_SOURCES = \ nix/libutil/archive.cc \ + nix/libutil/affinity.cc \ nix/libutil/serialise.cc \ nix/libutil/util.cc \ nix/libutil/xml-writer.cc \ @@ -63,6 +64,7 @@ libutil_a_SOURCES = \ nix/libutil/gcrypt-hash.cc libutil_headers = \ + nix/libutil/affinity.hh \ nix/libutil/hash.hh \ nix/libutil/serialise.hh \ nix/libutil/xml-writer.hh \ @@ -153,16 +155,6 @@ guix_register_LDADD = \ $(SQLITE3_LIBS) $(LIBGCRYPT_LIBS) -libexec_PROGRAMS = nix-setuid-helper -nix_setuid_helper_SOURCES = \ - nix/nix-setuid-helper/nix-setuid-helper.cc - -nix_setuid_helper_CPPFLAGS = \ - $(libutil_a_CPPFLAGS) - -nix_setuid_helper_LDADD = \ - libutil.a libformat.a - noinst_HEADERS = \ $(libformat_headers) $(libutil_headers) $(libstore_headers) \ $(guix_daemon_headers) @@ -180,6 +172,14 @@ nodist_pkglibexec_SCRIPTS = \ nix/scripts/list-runtime-roots \ nix/scripts/substitute-binary +if BUILD_DAEMON_OFFLOAD + +nodist_pkglibexec_SCRIPTS += \ + nix/scripts/offload + +endif BUILD_DAEMON_OFFLOAD + + # XXX: It'd be better to hide it in $(pkglibexecdir). nodist_libexec_SCRIPTS = \ nix/scripts/guix-authenticate diff --git a/doc/guix.texi b/doc/guix.texi index 93d1c2be3b..91fa07f1a8 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -175,13 +175,24 @@ your goal is to share the store with Nix. @cindex daemon Operations such as building a package or running the garbage collector -are all performed by a specialized process, the @dfn{Guix daemon}, on +are all performed by a specialized process, the @dfn{build daemon}, on behalf of clients. Only the daemon may access the store and its associated database. Thus, any operation that manipulates the store goes through the daemon. For instance, command-line tools such as @command{guix package} and @command{guix build} communicate with the daemon (@i{via} remote procedure calls) to instruct it what to do. +The following sections explain how to prepare the build daemon's +environment. + +@menu +* Build Environment Setup:: Preparing the isolated build environment. +* Daemon Offload Setup:: Offloading builds to remote machines. +@end menu + +@node Build Environment Setup +@subsection Build Environment Setup + In a standard multi-user setup, Guix and its daemon---the @command{guix-daemon} program---are installed by the system administrator; @file{/nix/store} is owned by @code{root} and @@ -229,43 +240,150 @@ The @code{guix-daemon} program may then be run as @code{root} with: @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 -environment contains nothing but the @code{/dev} and @code{/proc} -directories@footnote{On some systems @code{/dev/shm}, which supports -shared memory, is a symlink to another directory such as -@code{/run/shm}, that is @emph{not} is the chroot. When that is the -case, shared memory support is unavailable in the chroot environment. -The workaround is to make sure that @file{/dev/shm} is directly a -@code{tmpfs} mount point.}. - -Finally, you may want to generate a key pair to allow the daemon to -export signed archives of files from the store (@pxref{Invoking guix -archive}): +environment contains nothing but: -@example -# guix archive --generate-key -@end example +@c Keep this list in sync with libstore/build.cc! ----------------------- +@itemize +@item +the @code{/dev} and @code{/proc} directories@footnote{On some systems +@code{/dev/shm}, which supports shared memory, is a symlink to another +directory such as @code{/run/shm}, that is @emph{not} is the chroot. +When that is the case, shared memory support is unavailable in the +chroot environment. The workaround is to make sure that @file{/dev/shm} +is directly a @code{tmpfs} mount point.}; + +@item +@file{/etc/passwd} with an entry for the current user and an entry for +user @file{nobody}; + +@item +@file{/etc/group} with an entry for the user's group; + +@item +@file{/etc/hosts} with an entry that maps @code{localhost} to +@code{127.0.0.1}; -Guix may also be used in a single-user setup, with @command{guix-daemon} -running as an unprivileged user. However, to maximize non-interference -of build processes, the daemon still needs to perform certain operations -that are restricted to @code{root} on GNU/Linux: it should be able to -run build processes in a chroot, and to run them under different UIDs. -To that end, the @command{nix-setuid-helper} program is provided; it is -a small C program (less than 300 lines) that, if it is made setuid -@code{root}, can be executed by the daemon to perform these operations -on its behalf. The @code{root}-owned @file{/etc/nix-setuid.conf} file -is read by @command{nix-setuid-helper}; it should contain exactly two -words: the user name under which the authorized @command{guix-daemon} -runs, and the name of the build users group. - -If you are installing Guix as an unprivileged user and do not have the -ability to make @file{nix-setuid-helper} setuid-@code{root}, it is still +@item +a writable @file{/tmp} directory. +@end itemize + +If you are installing Guix as an unprivileged user, it is still possible to run @command{guix-daemon}. However, build processes will not be isolated from one another, and not from the rest of the system. Thus, build processes may interfere with each other, and may access programs, libraries, and other files available on the system---making it much harder to view them as @emph{pure} functions. + +@node Daemon Offload Setup +@subsection Using the Offload Facility + +@cindex offloading +@cindex build hook +When desired, the build daemon can @dfn{offload} +derivation builds to other machines +running Guix, using the @code{offload} @dfn{build hook}. When that +feature is enabled, a list of user-specified build machines is read from +@file{/etc/guix/machines.scm}; anytime a build is requested, for +instance via @code{guix build}, the daemon attempts to offload it to one +of the machines that satisfies the derivation's constraints, in +particular its system type---e.g., @file{x86_64-linux}. Missing +prerequisites for the build are copied over SSH to the target machine, +which then proceeds with the build; upon success the output(s) of the +build are copied back to the initial machine. + +The @file{/etc/guix/machines.scm} file typically looks like this: + +@example +(list (build-machine + (name "eightysix.example.org") + (system "x86_64-linux") + (user "bob") + (speed 2.)) ; incredibly fast! + + (build-machine + (name "meeps.example.org") + (system "mips64el-linux") + (user "alice") + (private-key + (string-append (getenv "HOME") + "/.ssh/id-rsa-for-guix")))) +@end example + +@noindent +In the example above we specify a list of two build machines, one for +the @code{x86_64} architecture and one for the @code{mips64el} +architecture. + +In fact, this file is---not surprisingly!---a Scheme file that is +evaluated when the @code{offload} hook is started. Its return value +must be a list of @code{build-machine} objects. While this example +shows a fixed list of build machines, one could imagine, say, using +DNS-SD to return a list of potential build machines discovered in the +local network (@pxref{Introduction, Guile-Avahi,, guile-avahi, Using +Avahi in Guile Scheme Programs}). + +The compulsory fields for a @code{build-machine} declaration are: + +@table @code + +@item name +The remote machine's host name. + +@item system +The remote machine's system type. + +@item user +The user account to use when connecting to the remote machine over SSH. +Note that the SSH key pair must @emph{not} be passphrase-protected, to +allow non-interactive logins. + +@end table + +@noindent +A number of optional fields may be specified: + +@table @code + +@item private-key +The SSH private key file to use when connecting to the machine. + +@item parallel-builds +The number of builds that may run in parallel on the machine (1 by +default.) + +@item speed +A ``relative speed factor''. The offload scheduler will tend to prefer +machines with a higher speed factor. + +@item features +A list of strings denoting specific features supported by the machine. +An example is @code{"kvm"} for machines that have the KVM Linux modules +and corresponding hardware support. Derivations can request features by +name, and they will be scheduled on matching build machines. + +@end table + +The @code{guix} command must be in the search path on the build +machines, since offloading works by invoking the @code{guix archive} and +@code{guix build} commands. + +There's one last thing to do once @file{machines.scm} is in place. As +explained above, when offloading, files are transferred back and forth +between the machine stores. For this to work, you need to generate a +key pair to allow the daemon to export signed archives of files from the +store (@pxref{Invoking guix archive}): + +@example +# guix archive --generate-key +@end example + +@noindent +Thus, when receiving files, a machine's build daemon can make sure they +are genuine, have not been tampered with, and that they are signed by an +authorized key. + + @node Invoking guix-daemon @section Invoking @command{guix-daemon} @@ -317,6 +435,14 @@ When the daemon runs with @code{--no-substitutes}, clients can still explicitly enable substitution @i{via} the @code{set-build-options} remote procedure call (@pxref{The Store}). +@cindex build hook +@item --no-build-hook +Do not use the @dfn{build hook}. + +The build hook is a helper program that the daemon can start and to +which it submits build requests. This mechanism is used to offload +builds to other machines (@pxref{Daemon Offload Setup}). + @item --cache-failures Cache build failures. By default, only successful builds are cached. @@ -1326,7 +1452,11 @@ derivations as Scheme objects, along with procedures to create and otherwise manipulate derivations. The lowest-level primitive to create a derivation is the @code{derivation} procedure: -@deffn {Scheme Procedure} derivation @var{store} @var{name} @var{builder} @var{args} [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] [#:hash-mode #f] [#:inputs '()] [#:env-vars '()] [#:system (%current-system)] [#:references-graphs #f] +@deffn {Scheme Procedure} derivation @var{store} @var{name} @var{builder} @ + @var{args} [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] @ + [#:hash-mode #f] [#:inputs '()] [#:env-vars '()] @ + [#:system (%current-system)] [#:references-graphs #f] @ + [#:local-build? #f] Build a derivation with the given arguments, and return the resulting @code{<derivation>} object. @@ -1338,6 +1468,11 @@ When @var{references-graphs} is true, it must be a list of file name/store path pairs. In that case, the reference graph of each store path is exported in the build environment in the corresponding file, in a simple text format. + +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 +where the costs of data transfers would outweigh the benefits. @end deffn @noindent @@ -1368,7 +1503,7 @@ the caller to directly pass a Guile expression as the build script: [#:system (%current-system)] [#:inputs '()] @ [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] @ [#:env-vars '()] [#:modules '()] @ - [#:references-graphs #f] [#:guile-for-build #f] + [#:references-graphs #f] [#:local-build? #f] [#:guile-for-build #f] Return a derivation that executes Scheme expression @var{exp} as a builder for derivation @var{name}. @var{inputs} must be a list of @code{(name drv-path sub-drv)} tuples; when @var{sub-drv} is omitted, @@ -1390,7 +1525,8 @@ terminates by passing the result of @var{exp} to @code{exit}; thus, when @var{guile-for-build} is omitted or is @code{#f}, the value of the @code{%guile-for-build} fluid is used instead. -See the @code{derivation} procedure for the meaning of @var{references-graphs}. +See the @code{derivation} procedure for the meaning of @var{references-graphs} +and @var{local-build?}. @end deffn @noindent @@ -1667,10 +1803,9 @@ Do not use substitutes for build products. That is, always build things locally instead of allowing downloads of pre-built binaries. @item --no-build-hook -Do not attempt to offload builds @i{via} the daemon's ``build hook''. -That is, always build things locally instead of offloading builds to -remote machines. -@c TODO: Add xref to build hook doc. +Do not attempt to offload builds @i{via} the daemon's ``build hook'' +(@pxref{Daemon Offload Setup}). That is, always build things locally +instead of offloading builds to remote machines. @item --max-silent-time=@var{seconds} When the build or substitution process remains silent for more than @@ -1978,7 +2113,12 @@ the load. To check whether a package has a @code{debug} output, use From a programming viewpoint, the package definitions of the distribution are provided by Guile modules in the @code{(gnu packages -...)} name space (@pxref{Modules, Guile modules,, guile, GNU Guile +@dots{})} name space@footnote{Note that packages under the @code{(gnu +packages @dots{})} module name space are not necessarily ``GNU +packages''. This module naming scheme follows the usual Guile module +naming convention: @code{gnu} means that these modules are distributed +as part of the GNU system, and @code{packages} identifies modules that +define packages.} (@pxref{Modules, Guile modules,, guile, GNU Guile Reference Manual}). For instance, the @code{(gnu packages emacs)} module exports a variable named @code{emacs}, which is bound to a @code{<package>} object (@pxref{Defining Packages}). The @code{(gnu @@ -2378,7 +2518,7 @@ Linux-Libre kernel, initial RAM disk, and boot loader looks like this: (gnu system service) ; for 'lsh-service' (gnu packages base) ; Coreutils, grep, etc. (gnu packages bash) ; Bash - (gnu packages system) ; dmd, Inetutils + (gnu packages admin) ; dmd, Inetutils (gnu packages zile) ; Zile (gnu packages less) ; less (gnu packages guile) ; Guile diff --git a/gnu-system.am b/gnu-system.am index dc840d3dbb..1f6fcf24d6 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -25,6 +25,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages.scm \ gnu/packages/acct.scm \ gnu/packages/acl.scm \ + gnu/packages/admin.scm \ gnu/packages/algebra.scm \ gnu/packages/apl.scm \ gnu/packages/apr.scm \ @@ -51,8 +52,11 @@ GNU_SYSTEM_MODULES = \ gnu/packages/cryptsetup.scm \ gnu/packages/curl.scm \ gnu/packages/cyrus-sasl.scm \ + gnu/packages/dc.scm \ gnu/packages/dejagnu.scm \ gnu/packages/ddrescue.scm \ + gnu/packages/dictionaries.scm \ + gnu/packages/docbook.scm \ gnu/packages/dwm.scm \ gnu/packages/ed.scm \ gnu/packages/elf.scm \ @@ -60,6 +64,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/fdisk.scm \ gnu/packages/file.scm \ gnu/packages/flex.scm \ + gnu/packages/fltk.scm \ gnu/packages/fonts.scm \ gnu/packages/fontutils.scm \ gnu/packages/freeipmi.scm \ @@ -138,13 +143,14 @@ GNU_SYSTEM_MODULES = \ gnu/packages/mtools.scm \ gnu/packages/mysql.scm \ gnu/packages/nano.scm \ + gnu/packages/ncdu.scm \ gnu/packages/ncurses.scm \ gnu/packages/netpbm.scm \ gnu/packages/nettle.scm \ gnu/packages/noweb.scm \ gnu/packages/ocaml.scm \ gnu/packages/ocrad.scm \ - gnu/packages/oggvorbis.scm \ + gnu/packages/onc-rpc.scm \ gnu/packages/openldap.scm \ gnu/packages/openssl.scm \ gnu/packages/package-management.scm \ @@ -154,6 +160,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/pdf.scm \ gnu/packages/pem.scm \ gnu/packages/perl.scm \ + gnu/packages/photo.scm \ gnu/packages/pkg-config.scm \ gnu/packages/plotutils.scm \ gnu/packages/popt.scm \ @@ -180,7 +187,6 @@ GNU_SYSTEM_MODULES = \ gnu/packages/sqlite.scm \ gnu/packages/ssh.scm \ gnu/packages/swig.scm \ - gnu/packages/system.scm \ gnu/packages/tcl.scm \ gnu/packages/tcsh.scm \ gnu/packages/texinfo.scm \ @@ -188,6 +194,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/time.scm \ gnu/packages/tmux.scm \ gnu/packages/tor.scm \ + gnu/packages/uucp.scm \ gnu/packages/unrtf.scm \ gnu/packages/valgrind.scm \ gnu/packages/version-control.scm \ @@ -200,6 +207,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/wget.scm \ gnu/packages/which.scm \ gnu/packages/wordnet.scm \ + gnu/packages/xiph.scm \ gnu/packages/xlockmore.scm \ gnu/packages/xml.scm \ gnu/packages/xnee.scm \ @@ -273,7 +281,6 @@ dist_patch_DATA = \ gnu/packages/patches/perl-no-sys-dirs.patch \ gnu/packages/patches/plotutils-libpng-jmpbuf.patch \ gnu/packages/patches/procps-make-3.82.patch \ - gnu/packages/patches/pspp-tests.patch \ gnu/packages/patches/pulseaudio-test-timeouts.patch \ gnu/packages/patches/pulseaudio-volume-test.patch \ gnu/packages/patches/python-fix-dbm.patch \ diff --git a/gnu/packages/system.scm b/gnu/packages/admin.scm index 536234f4aa..dfbf20d56f 100644 --- a/gnu/packages/system.scm +++ b/gnu/packages/admin.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -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 (gnu packages system) +(define-module (gnu packages admin) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) @@ -25,10 +25,13 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (gnu packages) + #:use-module (gnu packages base) #:use-module (gnu packages ncurses) + #:use-module (gnu packages readline) #:use-module (gnu packages linux) #:use-module (gnu packages guile) #:use-module (gnu packages gettext) + #:use-module (gnu packages perl) #:use-module ((gnu packages base) #:select (tar)) #:use-module ((gnu packages compression) @@ -130,21 +133,20 @@ re-executing them as necessary.") (define-public inetutils (package (name "inetutils") - (version "1.9.1") + (version "1.9.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/inetutils/inetutils-" version ".tar.gz")) (sha256 (base32 - "0azzg6njgq79byl6960kb0wihfhhzf49snslhxgvi30ribgfpa82")) - (patches - (list (search-patch "diffutils-gets-undeclared.patch"))))) + "04wrm0v7l4890mmbaawd6wjwdv08bkglgqhpz0q4dkb0l50fl8q4")))) (build-system gnu-build-system) (arguments `(;; FIXME: `tftp.sh' relies on `netstat' from utils-linux, ;; which is currently missing. #:tests? #f)) - (inputs `(("ncurses" ,ncurses))) + (inputs `(("ncurses" ,ncurses) + ("readline" ,readline))) ; for 'ftp' (home-page "http://www.gnu.org/software/inetutils/") (synopsis "Basic networking utilities") (description @@ -343,3 +345,86 @@ would need and has several interesting built-in capabilities.") "GNU Alive sends periodic pings to a server, generally to keep a connection alive.") (license gpl3+))) + +(define-public isc-dhcp + (package + (name "isc-dhcp") + (version "4.3.0a1") + (source (origin + (method url-fetch) + (uri (string-append "http://ftp.isc.org/isc/dhcp/" + version "/dhcp-" version ".tar.gz")) + (sha256 + (base32 + "0001n26m4488nl95h53wg60sywbli4d246vz2h8lpv70jlrq9q1p")))) + (build-system gnu-build-system) + (arguments + '(#:phases (alist-cons-after + 'configure 'post-configure + (lambda* (#:key outputs #:allow-other-keys) + ;; Point to the right client script, which will be + ;; installed in a later phase. + (substitute* "includes/dhcpd.h" + (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*") + (let ((out (assoc-ref outputs "out"))) + (string-append "#define _PATH_DHCLIENT_SCRIPT \"" + out "/libexec/dhclient-script" + "\"\n")))) + + ;; During the 'build' phase, 'bind.tar.gz' is extracted, so + ;; we must patch shebangs in there and make sure the right + ;; shell is used. + (with-directory-excursion "bind" + (substitute* "Makefile" + (("\\./configure") + (let ((sh (which "sh"))) + (string-append "./configure CONFIG_SHELL=" + sh " SHELL=" sh)))) + + (system* "tar" "xf" "bind.tar.gz") + (for-each patch-shebang + (find-files "bind-9.9.5b1" ".*")) + (zero? (system* "tar" "cf" "bind.tar.gz" + "bind-9.9.5b1")))) + (alist-cons-after + 'install 'post-install + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Install the dhclient script for GNU/Linux and make sure + ;; if finds all the programs it needs. + (let* ((out (assoc-ref outputs "out")) + (libexec (string-append out "/libexec")) + (coreutils (assoc-ref inputs "coreutils")) + (net-tools (assoc-ref inputs "net-tools")) + (sed (assoc-ref inputs "sed"))) + (substitute* "client/scripts/linux" + (("/sbin/ip") + (string-append (assoc-ref inputs "iproute") + "/sbin/ip"))) + + (mkdir-p libexec) + (copy-file "client/scripts/linux" + (string-append libexec "/dhclient-script")) + + (wrap-program (string-append libexec "/dhclient-script") + `("PATH" ":" prefix + ,(map (lambda (dir) + (string-append dir "/bin:" + dir "/sbin")) + (list net-tools coreutils sed)))))) + %standard-phases)))) + + (native-inputs `(("perl" ,perl))) + + ;; Even Coreutils and sed are needed here in case we're cross-compiling. + (inputs `(("coreutils" ,coreutils) + ("sed" ,sed) + ("net-tools" ,net-tools) + ("iproute" ,iproute))) + + (home-page "http://www.isc.org/products/DHCP/") + (synopsis "Dynamic Host Configuration Protocol (DHCP) tools") + (description + "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a +reference implementation of all aspects of DHCP, through a suite of DHCP +tools: server, client, and relay agent.") + (license isc))) diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm index c1db358a3b..122daa7136 100644 --- a/gnu/packages/aspell.scm +++ b/gnu/packages/aspell.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,7 +21,8 @@ #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix licenses) - #:use-module (gnu packages perl)) + #:use-module (gnu packages perl) + #:use-module (gnu packages which)) (define-public aspell (package @@ -45,3 +46,71 @@ a standalone program. Notable features of Aspell include its full support of documents written in the UTF-8 encoding and its ability to use multiple dictionaries, including personal ones.") (license lgpl2.1+))) + + +;;; +;;; Dictionaries. +;;; +;;; Use 'export ASPELL_CONF="dict-dir $HOME/.guix-profile/lib/aspell"' to use them. +;;; + +(define* (aspell-dictionary dict-name full-name + #:key version sha256 (prefix "aspell6-")) + (package + (name (string-append "aspell-dict-" dict-name)) + (version version) + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/aspell/dict/" dict-name + "/" prefix dict-name "-" + version ".tar.bz2")) + (sha256 sha256))) + (build-system gnu-build-system) + (arguments + `(#:phases (alist-replace + 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (zero? (system* "./configure")))) + %standard-phases) + #:make-flags (let ((out (assoc-ref %outputs "out"))) + (list (string-append "dictdir=" out "/lib/aspell") + (string-append "datadir=" out "/lib/aspell"))) + #:tests? #f)) + (native-inputs `(("aspell" ,aspell) + ("which" ,which))) + (synopsis (string-append full-name " dictionary for GNU Aspell")) ; XXX: i18n + (description + "This package provides a dictionary for the GNU Aspell spell checker.") + (license gpl2+) + (home-page "http://aspell.net/"))) + + +(define-public aspell-dict-en + (aspell-dictionary "en" "English" + #:version "7.1-0" + #:sha256 + (base32 + "02ldfiny4iakgfgy4sdrzjqdzi7l1rmb6y30lv31kfy5x31g77gz"))) + +(define-public aspell-dict-eo + (aspell-dictionary "eo" "Esperanto" + #:version "2.1.20000225a-2" + #:sha256 + (base32 + "09vf0mbiicbmyb4bwb7v7lgpabnylg0wy7m3hlhl5rjdda6x3lj1"))) + +(define-public aspell-dict-es + (aspell-dictionary "es" "Spanish" + #:version "1.11-2" + #:sha256 + (base32 + "1k5g328ac1hdpp6fsg57d8md6i0aqcwlszp3gbmp5706wyhpydmd"))) + +(define-public aspell-dict-fr + (aspell-dictionary "fr" "French" + #:version "0.50-3" + #:prefix "aspell-" + #:sha256 + (base32 + "14ffy9mn5jqqpp437kannc3559bfdrpk7r36ljkzjalxa53i0hpr"))) diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm index 7cce9671d1..b223721520 100644 --- a/gnu/packages/bdw-gc.scm +++ b/gnu/packages/bdw-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, 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,7 +20,8 @@ #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (gnu packages pkg-config)) (define-public libgc (package @@ -59,6 +60,49 @@ Alternatively, the garbage collector may be used as a leak detector for C or C++ programs, though that is not its primary goal.") (home-page "http://www.hpl.hp.com/personal/Hans_Boehm/gc/") - ;; permissive X11-style license: - ;; http://www.hpl.hp.com/personal/Hans_Boehm/gc/license.txt - (license x11))) + (license + (x11-style "http://www.hpl.hp.com/personal/Hans_Boehm/gc/license.txt")))) + +(define-public libatomic-ops + (package + (name "libatomic-ops") + (version "7.4.0") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/libatomic_ops-" + version ".tar.gz")) + (sha256 + (base32 + "0njv3n63zw6v45k68z6dz14g2hpk5p230ncwmdfkglsljb1cqx98")))) + (build-system gnu-build-system) + (outputs '("out" "debug")) + (synopsis "Accessing hardware atomic memory update operations") + (description + "This C library provides semi-portable access to hardware-provided atomic +memory update operations on a number architectures. These might allow you to +write code that does more interesting things in signal handlers, write +lock-free code, experiment with thread programming paradigms, etc.") + (home-page "http://www.hpl.hp.com/research/linux/atomic_ops/") + + ;; Some source files are X11-style, others are GPLv2+. + (license gpl2+))) + +(define-public libgc-7.4 + (package (inherit libgc) + (version "7.4.0") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-" + version ".tar.gz")) + (sha256 + (base32 + "10z2nph62ilab063wygg2lv0jxlsbcf2az9w1lx01jzqj5lzry31")))) + + ;; New dependencies. + (native-inputs `(("pkg-config" ,pkg-config))) + (inputs `(("libatomic-ops" ,libatomic-ops))) + + ;; 'USE_LIBC_PRIVATES' is now the default. + (arguments '()))) diff --git a/gnu/packages/dc.scm b/gnu/packages/dc.scm new file mode 100644 index 0000000000..75ed5f4af7 --- /dev/null +++ b/gnu/packages/dc.scm @@ -0,0 +1,60 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in> +;;; +;;; 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 dc) + #:use-module (gnu packages) + #:use-module (gnu packages compression) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnutls) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages sqlite) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module ((guix licenses) + #:renamer (symbol-prefix-proc 'license:))) + +(define-public ncdc + (package + (name "ncdc") + (version "1.18.1") + (source + (origin + (method url-fetch) + (uri (string-append "http://dev.yorhel.nl/download/ncdc-" version + ".tar.gz")) + (sha256 (base32 + "11c6z9c3vv2vg01q02r53m28q3cx6x66j1l63f1mbk1crlqpf9fc")))) + (build-system gnu-build-system) + (inputs + `(("bzip2" ,bzip2) + ("glib" ,glib) + ("gnutls" ,gnutls) + ("ncurses" ,ncurses) + ("sqlite" ,sqlite) + ("zlib" ,zlib))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (home-page "http://dev.yorhel.nl/ncdc") + (synopsis + "Lightweight direct connect client with a friendly ncurses interface") + (description + "Ncdc is a client for the Direct Connect peer-to-peer protocol implemented +using ncurses. It is known for its smaller footprint and ease of use.") + (license license:x11))) diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm new file mode 100644 index 0000000000..4520c2149f --- /dev/null +++ b/gnu/packages/dictionaries.scm @@ -0,0 +1,78 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014 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 dictionaries) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system trivial) + #:use-module (gnu packages base) + #:use-module (gnu packages texinfo) + #:use-module ((gnu packages compression) + #:select (gzip))) + +(define-public vera + (package + (name "vera") + (version "1.21a") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/vera/vera-" version + ".tar.gz")) + (sha256 + (base32 + "09qz1g8js8qw735wmd8kraqbk1d1997v3px2lcc58frf1r66bp8f")))) + (build-system trivial-build-system) + (arguments + `(#:builder (begin + (use-modules (guix build utils)) + + (let* ((out (assoc-ref %outputs "out")) + (info (string-append out "/share/info")) + (html (string-append out "/share/html")) + (source (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (gz (assoc-ref %build-inputs "gzip")) + (texi (assoc-ref %build-inputs "texinfo"))) + (setenv "PATH" (string-append gz "/bin")) + (system* (string-append tar "/bin/tar") "xvf" source) + + (chdir (string-append "vera-" ,version)) + (mkdir-p info) + (mkdir-p html) + + ;; XXX: Use '--force' because the document is unhappy + ;; with Texinfo 5 (yes, documents can be unhappy.) + (and (zero? + (system* (string-append texi "/bin/makeinfo") + "vera.texi" "--force" "-o" + (string-append info "/vera.info"))) + (zero? + (system* (string-append texi "/bin/makeinfo") + "vera.texi" "--force" "--html" "-o" + (string-append html "/vera.html")))))) + #:modules ((guix build utils)))) + (native-inputs `(("texinfo" ,texinfo) + ("tar" ,tar) + ("gzip" ,gzip))) + (home-page "http://savannah.gnu.org/projects/vera/") + (synopsis "List of acronyms") + (description + "V.E.R.A. (Virtual Entity of Relevant Acronyms) is a list of computing +acronyms distributed as an info document.") + (license fdl1.3+))) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm new file mode 100644 index 0000000000..f6d20097e4 --- /dev/null +++ b/gnu/packages/docbook.scm @@ -0,0 +1,100 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014 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 docbook) + #:use-module (gnu packages) + #:use-module (gnu packages compression) + #:use-module ((gnu packages base) + #:select (tar)) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system trivial) + #:autoload (gnu packages zip) (unzip)) + +(define-public docbook-xml + (package + (name "docbook-xml") + (version "4.5") + (source (origin + (method url-fetch) + (uri (string-append "http://www.docbook.org/xml/" version + "/docbook-xml-" version ".zip")) + (sha256 + (base32 + "1d671lcjckjri28xfbf6dq7y3xnkppa910w1jin8rjc35dx06kjf")))) + (build-system trivial-build-system) + (arguments + '(#:builder (begin + (use-modules (guix build utils)) + + (let* ((unzip + (string-append (assoc-ref %build-inputs "unzip") + "/bin/unzip")) + (source (assoc-ref %build-inputs "source")) + (out (assoc-ref %outputs "out")) + (dtd (string-append out "/xml/dtd/docbook"))) + (mkdir-p dtd) + (with-directory-excursion dtd + (system* unzip source)))) + #:modules ((guix build utils)))) + (native-inputs `(("unzip" ,unzip))) + (home-page "http://docbook.org") + (synopsis "DocBook XML DTDs for document authoring") + (description + "DocBook is general purpose XML and SGML document type particularly well +suited to books and papers about computer hardware and software (though it is +by no means limited to these applications.) This package provides XML DTDs.") + (license (x11-style "" "See file headers.")))) + +(define-public docbook-xsl + (package + (name "docbook-xsl") + (version "1.72.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/docbook/docbook-xsl-" + version ".tar.bz2")) + (sha256 + (base32 + "1cnrfgqz8pc9wnlgqjch2338ad7jki6d4h6b2fhaxn1a2201df5k")))) + (build-system trivial-build-system) + (arguments + `(#:builder (begin + (use-modules (guix build utils)) + + (let* ((bzip2 (assoc-ref %build-inputs "bzip2")) + (tar (assoc-ref %build-inputs "tar")) + (source (assoc-ref %build-inputs "source")) + (out (assoc-ref %outputs "out")) + (xsl (string-append out "/xml/xsl"))) + (setenv "PATH" (string-append bzip2 "/bin")) + (system* (string-append tar "/bin/tar") "xvf" source) + + (mkdir-p xsl) + (copy-recursively (string-append ,name "-" ,version) + (string-append xsl "/" ,name + "-" ,version)))) + #:modules ((guix build utils)))) + (native-inputs `(("bzip2" ,bzip2) + ("tar" ,tar))) + (home-page "http://docbook.org") + (synopsis "DocBook XSL style sheets for document authoring") + (description + "This package provides XSL style sheets for DocBook.") + (license (x11-style "" "See 'COPYING' file.")))) diff --git a/gnu/packages/fltk.scm b/gnu/packages/fltk.scm new file mode 100644 index 0000000000..4c8fc3f2c7 --- /dev/null +++ b/gnu/packages/fltk.scm @@ -0,0 +1,63 @@ +;;; GNU Guix --- Functional package management for GNU +;;; 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 fltk) + #:use-module (guix licenses) + #:use-module (gnu packages xorg) + #:use-module (gnu packages gl) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public fltk + (package + (name "fltk") + (version "1.3.2") + (source + (origin + (method url-fetch) + (uri (string-append "http://fltk.org/pub/fltk/" version "/fltk-" version "-source.tar.gz")) + (sha256 + (base32 + "1974brlk723095vf8z72kazq1cbqr9a51kq6b0xda6zkjkgl8q0p")))) + (build-system gnu-build-system) + (inputs + `(("libx11" ,libx11) + ("mesa" ,mesa))) + (arguments + `(#:phases + (alist-replace + 'check + (lambda* (#:key inputs #:allow-other-keys) #t) ;; fltk does not have a + ;; check target + (alist-replace + 'configure + (lambda* (#:key outputs #:allow-other-keys #:rest args) + (let ((configure (assoc-ref %standard-phases 'configure))) + (substitute* "makeinclude.in" + (("/bin/sh") (which "sh"))) + (apply configure args))) + %standard-phases)))) + (home-page "https://www.fltk.org") + (synopsis "3D C++ GUI library") + (description "FLTK is a C++ GUI toolkit providing modern GUI functionality without the +bloat. It supports 3D graphics via OpenGL and its built-in GLUT emulation. +FLTK is designed to be small and modular enough to be statically linked, but +works fine as a shared library. FLTK also includes an excellent UI builder +called FLUID that can be used to create applications in minutes.") + (license lgpl2.0))) ; plus certain additional permissions diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 0f5ae4174d..46fbd21805 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -86,10 +86,11 @@ representation of the playing board.") (native-inputs `(("gettext" ,gnu-gettext) ("pkg-config" ,pkg-config))) (home-page "https://www.gnu.org/software/gnubik/") - (synopsis "3d Rubik's cube game.") - (description "GNUbik is a puzzle game in which you must manipulate a cube to make + (synopsis "3d Rubik's cube game") + (description + "GNUbik is a puzzle game in which you must manipulate a cube to make each of its faces have a uniform color. The game is customizable, allowing you to set the size of the cube (the default is 3x3) or to change the colors. -You may even apply photos to the faces instead of colors. The game is + You may even apply photos to the faces instead of colors. The game is scriptable with Guile.") (license gpl3+))) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index ee8aed9284..796f7f0211 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -1,4 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2013 Guy Grant <gzg@riseup.net> ;;; ;;; This file is part of GNU Guix. @@ -138,12 +139,12 @@ Polygon meshes, and Extruded polygon meshes") (propagated-inputs `(("glproto" ,glproto) ("libdrm" ,libdrm-2.4.33) + ("libx11" ,libx11) ("libxdamage" ,libxdamage) ("libxxf86vm" ,libxxf86vm))) (inputs `(("dri2proto" ,dri2proto) ("expat" ,expat) - ("libx11" ,libx11) ("libxfixes" ,libxfixes) ("libxml2" ,libxml2) ("makedepend" ,makedepend))) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 6fc283467c..0560915b24 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; @@ -106,14 +106,14 @@ shared NFS home directories.") (define glib (package (name "glib") - (version "2.38.0") + (version "2.39.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" (string-take version 4) "/" name "-" version ".tar.xz")) (sha256 - (base32 "0cpzqadqk6z6bmb79p04pykxc8x57rvshh33414cnk41bvgaf4vm")) + (base32 "0lqi6z47068vgh91fm59jn0kq969wf3g2q8k4m33jsb0amprg36h")) (patches (list (search-patch "glib-tests-homedir.patch") (search-patch "glib-tests-desktop.patch") (search-patch "glib-tests-prlimit.patch") @@ -155,7 +155,11 @@ 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")) + + ;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a + ;; file that gets compiled possibly before it has been fully generated. + #:parallel-tests? #f)) (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME") (description "GLib provides data structure handling for C, portability wrappers, diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm index df5b1e337c..52a434a61c 100644 --- a/gnu/packages/gnunet.scm +++ b/gnu/packages/gnunet.scm @@ -28,10 +28,10 @@ #:use-module (gnu packages gstreamer) #:use-module (gnu packages libjpeg) #:use-module (gnu packages libtiff) - #:use-module (gnu packages oggvorbis) #:use-module (gnu packages openssl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages video) + #:use-module (gnu packages xiph) #:use-module ((guix licenses) #:renamer (symbol-prefix-proc 'license:)) #:use-module (guix packages) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index c3f717e60e..0be19c6177 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; ;;; This file is part of GNU Guix. @@ -27,6 +27,10 @@ #:use-module (gnu packages readline) #:use-module ((gnu packages compression) #:renamer (symbol-prefix-proc 'guix:)) + #:use-module (gnu packages gtk) + #:use-module (gnu packages glib) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages ncurses) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu)) @@ -389,3 +393,28 @@ including tools for signing keys, keyring analysis, and party preparation. ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright (license gpl2) (home-page "http://pgp-tools.alioth.debian.org/"))) + +(define-public pinentry + (package + (name "pinentry") + (version "0.8.3") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnupg/pinentry/pinentry-" + version ".tar.bz2")) + (sha256 + (base32 + "1bd047crf7xb8g61mval8v6qww98rddlsw2dz6j8h8qbnl4hp2sn")))) + (build-system gnu-build-system) + (inputs + `(("ncurses" ,ncurses) + ("gtk+" ,gtk+-2) + ("glib" ,glib))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (home-page "http://gnupg.org/aegypten2/") + (synopsis "GnuPG's interface to passphrase input") + (description + "Pinentry provides a console and a GTK+ GUI that allows users to +enter a passphrase when `gpg' or `gpg2' is run and needs it.") + (license gpl2+))) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 3dbb5d8429..29ec1096dc 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -35,7 +35,9 @@ #:use-module (gnu packages which) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (guix utils) + #:use-module (ice-9 match)) ;;; Commentary: ;;; @@ -134,7 +136,7 @@ without requiring the source code to be rewritten.") ;; The headers and/or `guile-2.0.pc' refer to these packages, so they ;; must be propagated. - ("bdw-gc" ,libgc) + ("bdw-gc" ,libgc-7.4) ("gmp" ,gmp))) (self-native-input? #t) @@ -173,7 +175,15 @@ without requiring the source code to be rewritten.") (define-public guile-2.0/fixed ;; A package of Guile 2.0 that's rarely changed. It is the one used ;; in the `base' module, and thus changing it entails a full rebuild. - guile-2.0) + (package (inherit guile-2.0) + (location (source-properties->location (current-source-location))) + + ;; Keep using the stable libgc. + (propagated-inputs (map (match-lambda + (("bdw-gc" _) + `("bdw-gc" ,libgc)) + (x x)) + (package-propagated-inputs guile-2.0))))) ;;; diff --git a/gnu/packages/libcanberra.scm b/gnu/packages/libcanberra.scm index dacbe31a31..1106a8aa83 100644 --- a/gnu/packages/libcanberra.scm +++ b/gnu/packages/libcanberra.scm @@ -25,8 +25,8 @@ #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) #:use-module (gnu packages linux) - #:use-module (gnu packages oggvorbis) - #:use-module (gnu packages pkg-config)) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages xiph)) (define-public libcanberra (package diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 826a5d7a73..5e80a5837d 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> ;;; ;;; This file is part of GNU Guix. @@ -819,3 +819,24 @@ an interactive mode where the user can experiment various power management settings for cases where the operating system has not enabled these settings.") (license gpl2))) + +(define-public aumix + (package + (name "aumix") + (version "2.9.1") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.jpj.net/~trevor/aumix/releases/aumix-" + version ".tar.bz2")) + (sha256 + (base32 + "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj")))) + (build-system gnu-build-system) + (inputs `(("ncurses" ,ncurses))) + (home-page "http://www.jpj.net/~trevor/aumix.html") + (synopsis "Audio mixer for X and the console") + (description + "Aumix adjusts an audio mixer from X, the console, a terminal, +the command line or a script.") + (license gpl2+))) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index d46fd160ad..640d502783 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -125,7 +125,7 @@ LP/MIP solver is included in the package.") (define-public pspp (package (name "pspp") - (version "0.8.1") + (version "0.8.2") (source (origin (method url-fetch) @@ -133,8 +133,7 @@ LP/MIP solver is included in the package.") version ".tar.gz")) (sha256 (base32 - "0qhxsdbwxd3cn1shc13wxvx2lg32lp4z6sz24kv3jz7p5xfi8j7x")) - (patches (list (search-patch "pspp-tests.patch"))))) + "1w7h3dglgx0jlq1wb605b8pgfsk2vr1q2q2rj7bsajh9ihbcsixr")))) (build-system gnu-build-system) (inputs `(("cairo" ,cairo) diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm index a8eeb952b9..7e324703a6 100644 --- a/gnu/packages/mp3.scm +++ b/gnu/packages/mp3.scm @@ -23,12 +23,13 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages cdrom) #:use-module (gnu packages compression) + #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) - #:use-module (gnu packages oggvorbis) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages xiph) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu)) @@ -266,3 +267,64 @@ a few mouse clicks to convert an entire album. It supports CDDB lookups for album and track information.") (license license:gpl2) (home-page "http://sourceforge.net/projects/ripperx/"))) + +(define-public libmpcdec + (package + (name "libmpcdec") + (version "1.2.6") + (source (origin + (method url-fetch) + (uri (string-append + "http://files.musepack.net/source/libmpcdec-" + version ".tar.bz2")) + (sha256 + (base32 + "1a0jdyga1zfi4wgkg3905y6inghy3s4xfs5m4x7pal08m0llkmab")))) + (build-system gnu-build-system) + (synopsis "Decoding library for the Musepack audio format") + (description + "This library supports decoding of the Musepack (MPC) audio compression +format.") + (license license:bsd-3) + (home-page "http://musepack.net"))) + +(define-public mpc123 + (package + (name "mpc123") + (version "0.2.4") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/mpc123/version%20" + version "/mpc123-" version ".tar.gz")) + (sha256 + (base32 + "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1")))) + (build-system gnu-build-system) + (arguments + '(#:phases (alist-replace + 'configure + (lambda _ + (substitute* "Makefile" + (("CC[[:blank:]]*:=.*") + "CC := gcc\n"))) + (alist-replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (copy-file "mpc123" (string-append bin "/mpc123")))) + %standard-phases)) + #:tests? #f)) + + (native-inputs + `(("gettext" ,gnu-gettext))) + (inputs + `(("libao" ,ao) + ("libmpcdec" ,libmpcdec))) + (home-page "http://mpc123.sourceforge.net/") + (synopsis "Audio player for Musepack-formatted files") + (description + "mpc123 is a command-line player for files in the Musepack audio +compression format (.mpc files.)") + (license license:gpl2+))) diff --git a/gnu/packages/ncdu.scm b/gnu/packages/ncdu.scm new file mode 100644 index 0000000000..7052567530 --- /dev/null +++ b/gnu/packages/ncdu.scm @@ -0,0 +1,48 @@ +;;; GNU Guix --- Functional package management for GNU +;;; 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 ncdu) + #:use-module (gnu packages) + #:use-module (gnu packages ncurses) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public ncdu + (package + (name "ncdu") + (version "1.10") + (source (origin + (method url-fetch) + (uri (string-append "http://dev.yorhel.nl/download/ncdu-" + version ".tar.gz")) + (sha256 + (base32 + "0rqc5wpqcbfqpcwxgh3jxwa0yw2py0hv0acpsf0a9g6v9144m6gm")))) + (inputs + `(("ncurses" ,ncurses))) + (build-system gnu-build-system) + (synopsis "Ncurses based disk usage analyzer") + (description "A disk usage analyzer with an ncurses interface, aimed to be +run on a remote server where you don't have an entire gaphical setup, but have +to do with a simple SSH connection. ncdu aims to be fast, simple and easy to +use, and should be able to run in any minimal POSIX-like environment with +ncurses installed.") + (license (x11-style "http://g.blicky.net/ncdu.git/plain/COPYING?id=v1.10")) + (home-page "http://dev.yorhel.nl/ncdu"))) diff --git a/gnu/packages/onc-rpc.scm b/gnu/packages/onc-rpc.scm new file mode 100644 index 0000000000..8861b0e8db --- /dev/null +++ b/gnu/packages/onc-rpc.scm @@ -0,0 +1,55 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014 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 onc-rpc) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public libtirpc + (package + (name "libtirpc") + (version "0.2.4") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/libtirpc/" + version "/libtirpc-" + version ".tar.bz2")) + (sha256 + (base32 + "18a337wa4amf0k21wnimp3yzs5l3cxqndz4x3x8bm993zhfy5hs5")))) + (build-system gnu-build-system) + (arguments + '(;; Doesn't work with GNU GSS. + #:configure-flags '("--disable-gssapi") + + #:phases (alist-cons-after + 'unpack 'remote-dangling-symlink + (lambda _ + ;; Remote the dangling symlinks since it breaks the + ;; 'patch-source-shebangs' file tree traversal. + (delete-file "INSTALL")) + %standard-phases))) + (home-page "http://sourceforge.net/projects/libtirpc/") + (synopsis "Transport-independent Sun/ONC RPC implementation") + (description + "This package provides a library that implements the Sun/ONC RPC (remote +procedure calls) protocol in a transport-independent manner. It supports both +IPv4 and IPv6. ONC RPC is notably used by the network file system (NFS).") + (license bsd-3))) diff --git a/gnu/packages/patches/glib-tests-desktop.patch b/gnu/packages/patches/glib-tests-desktop.patch index 0824e68963..efa877c59e 100644 --- a/gnu/packages/patches/glib-tests-desktop.patch +++ b/gnu/packages/patches/glib-tests-desktop.patch @@ -38,12 +38,13 @@ database, the `update-desktop-database' program, which we don't provide. return g_test_run (); } ---- glib-2.37.1/gio/tests/desktop-app-info.c 2013-06-07 23:46:28.000000000 +0200 -+++ glib-2.37.1/gio/tests/desktop-app-info.c 2013-06-07 23:46:32.000000000 +0200 -@@ -385,6 +385,7 @@ main (int argc, + +--- glib-2.39.1/gio/tests/desktop-app-info.c 2013-06-07 23:46:28.000000000 +0200 ++++ glib-2.39.1/gio/tests/desktop-app-info.c 2013-06-07 23:46:32.000000000 +0200 +@@ -699,6 +699,7 @@ main (int argc, g_setenv ("XDG_DATA_HOME", basedir, TRUE); cleanup_subdirs (basedir); - + + return 0; g_test_add_func ("/desktop-app-info/delete", test_delete); g_test_add_func ("/desktop-app-info/default", test_default); @@ -54,9 +55,9 @@ database, the `update-desktop-database' program, which we don't provide. The hunk below removes tests that depend on `gdbus-testserver.py', because that script depends on python-gobject. ---- glib-2.38.0.orig/gio/tests/Makefile.in 2013-09-23 23:07:46.000000000 +0200 -+++ glib-2.38.0/gio/tests/Makefile.in 2013-09-30 21:55:35.000000000 +0200 -@@ -172,19 +172,12 @@ +--- glib-2.39.1/gio/tests/Makefile.in 2014-01-20 00:18:16.000000000 +0100 ++++ glib-2.39.1/gio/tests/Makefile.in 2014-01-20 00:18:47.000000000 +0100 +@@ -171,20 +171,13 @@ check_PROGRAMS = $(am__EXEEXT_14) @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-auth \ @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-bz627724 \ @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-close-pending \ @@ -72,10 +73,11 @@ because that script depends on python-gobject. @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-proxy-threads \ -@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-proxy-well-known-name \ @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-test-codegen \ + @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-test-codegen-old \ -@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-threading \ @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gmenumodel \ @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ $(NULL) - + The test below depends on the availability /etc/passwd to dbus-daemon. @@ -105,3 +107,17 @@ The test dbus-appinfo is dropped as it hangs indefinitely since 2.37.5, see session_bus_up (); + +The test below fails for unknown reasons (!). + +--- glib-2.39.1/gio/tests/gsettings.c.orig 2014-01-20 00:45:04.000000000 +0100 ++++ glib-2.39.1/gio/tests/gsettings.c 2014-01-20 00:45:10.000000000 +0100 +@@ -2489,7 +2489,6 @@ main (int argc, char *argv[]) + g_test_add_func ("/gsettings/range/subprocess/high", test_range_high); + g_test_add_func ("/gsettings/range/subprocess/low", test_range_low); + g_test_add_func ("/gsettings/list-items", test_list_items); +- g_test_add_func ("/gsettings/list-schemas", test_list_schemas); + g_test_add_func ("/gsettings/mapped", test_get_mapped); + g_test_add_func ("/gsettings/get-range", test_get_range); + g_test_add_func ("/gsettings/schema-source", test_schema_source); + diff --git a/gnu/packages/patches/pspp-tests.patch b/gnu/packages/patches/pspp-tests.patch deleted file mode 100644 index 3e61b68804..0000000000 --- a/gnu/packages/patches/pspp-tests.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/tests/output/render-test.c b/tests/output/render-test.c -index 5f4c1da..e9df96c 100644 ---- a/tests/output/render-test.c -+++ b/tests/output/render-test.c -@@ -142,7 +142,7 @@ configure_drivers (int width, int length) - string_map_insert (&options, "left-margin", "0"); - string_map_insert (&options, "right-margin", "0"); - string_map_insert_nocopy (&options, xstrdup ("paper-size"), -- xasprintf ("%dx%dpt", width * 5, length * 8)); -+ xasprintf ("%dx%dpt", width * 5, length * 16)); - driver = output_driver_create (&options); - if (driver == NULL) - exit (EXIT_FAILURE); diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm new file mode 100644 index 0000000000..8bc2079f4c --- /dev/null +++ b/gnu/packages/photo.scm @@ -0,0 +1,121 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014 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 photo) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages libusb) + #:use-module (gnu packages autotools) + #:use-module (gnu packages readline) + #:use-module (gnu packages popt) + #:use-module ((gnu packages base) #:select (tzdata))) + +(define-public libexif + (package + (name "libexif") + (version "0.6.21") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/libexif/libexif-" + version ".tar.bz2")) + (sha256 + (base32 + "06nlsibr3ylfwp28w8f5466l6drgrnydgxrm4jmxzrmk5svaxk8n")))) + (build-system gnu-build-system) + (home-page "http://libexif.sourceforge.net/") + (synopsis "Read and manipulate EXIF data in digital photographs") + (description + "The libexif C library allows applications to read, edit, and save EXIF +data as produced by digital cameras.") + (license lgpl2.1+))) + +(define-public libgphoto2 + (package + (name "libgphoto2") + (version "2.5.2") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/gphoto/libgphoto2-" + version ".tar.bz2")) + (sha256 + (base32 + "0f1818l1vs5fbmrihzyv3qasddbqi3r01jik5crrxddwalsi2bd3")))) + (build-system gnu-build-system) + (native-inputs `(("pkg-config" ,pkg-config))) + (inputs + `(;; ("libjpeg-turbo" ,libjpeg-turbo) + ("libtool" ,libtool) + ("libusb" ,libusb))) + (propagated-inputs + `(;; The .pc refers to libexif. + ("libexif" ,libexif))) + (home-page "http://www.gphoto.org/proj/libgphoto2/") + (synopsis "Accessing digital cameras") + (description + "This is the library backend for gphoto2. It contains the code for PTP, +MTP, and other vendor specific protocols for controlling and transferring data +from digital cameras.") + + ;; 'COPYING' says LGPLv2.1+, but in practices files are under LGPLv2+. + (license lgpl2.1+))) + +(define-public gphoto2 + (package + (name "gphoto2") + (version "2.5.2") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/gphoto/gphoto2-" + version ".tar.bz2")) + (sha256 + (base32 + "16c8k1cxfypg7v5h8xi87grclw7a5ayaamn548ys3zkj727r5fcf")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("readline" ,readline) + ;; ("libjpeg-turbo" ,libjpeg-turbo) + ("popt" ,popt) + ("libexif" ,libexif) + ("libgphoto2" ,libgphoto2))) + (arguments + '(#:phases (alist-cons-before + 'check 'pre-check + (lambda* (#:key inputs #:allow-other-keys) + (substitute* (find-files "tests/data" "\\.param$") + (("/usr/bin/env") + (which "env")))) + %standard-phases) + + ;; FIXME: There are 2 test failures, most likely related to the build + ;; environment. + #:tests? #f)) + + (home-page "http://www.gphoto.org/") + (synopsis "Command-line tools to access digital cameras") + (description + "Gphoto2 is a set of command line utilities for manipulating a large +number of different digital cameras. Through libgphoto2, it supports PTP, +MTP, and much more.") + + ;; Files are typically under LGPLv2+, but 'COPYING' says GPLv2+. + (license gpl2+))) diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm index 91bbe2d77a..8bf48c2a89 100644 --- a/gnu/packages/pulseaudio.scm +++ b/gnu/packages/pulseaudio.scm @@ -23,18 +23,18 @@ #:renamer (symbol-prefix-proc 'l:)) #:use-module (guix build-system gnu) #:use-module (gnu packages) - #:use-module (gnu packages linux) - #:use-module (gnu packages oggvorbis) - #:use-module (gnu packages pkg-config) + #:use-module (gnu packages algebra) + #:use-module ((gnu packages autotools) #:select (libtool)) #:use-module (gnu packages avahi) + #:use-module (gnu packages check) + #:use-module (gnu packages gdbm) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) #:use-module (gnu packages libcanberra) - #:use-module (gnu packages algebra) - #:use-module ((gnu packages autotools) #:select (libtool)) - #:use-module (gnu packages gdbm) + #:use-module (gnu packages linux) #:use-module (gnu packages m4) - #:use-module (gnu packages check) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages xiph) #:export (libsndfile libsamplerate json-c diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm index 86b403503b..25ae1b0721 100644 --- a/gnu/packages/sdl.scm +++ b/gnu/packages/sdl.scm @@ -28,10 +28,10 @@ #:use-module (gnu packages libtiff) #:use-module (gnu packages linux) #:use-module (gnu packages mp3) - #:use-module (gnu packages oggvorbis) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages gl) + #:use-module (gnu packages xiph) #:use-module (gnu packages xorg) #:export (sdl sdl2 diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm index ae083cd74f..f688e137d5 100644 --- a/gnu/packages/sqlite.scm +++ b/gnu/packages/sqlite.scm @@ -26,7 +26,7 @@ (define-public sqlite (package (name "sqlite") - (version "3.7.15.2") + (version "3.8.2") (source (origin (method url-fetch) ;; TODO: Download from sqlite.org once this bug : @@ -34,10 +34,10 @@ ;; has been fixed. (uri (string-append "mirror://sourceforge/sqlite.mirror/SQLite%20" - version "/sqlite-autoconf-3071502.tar.gz")) + version "/sqlite-autoconf-3080200.tar.gz")) (sha256 (base32 - "135s6r5z12q56brywpxnraqbqm7bdkxs76v7dygqgjpnjyvicbbq")))) + "14pg9zlwbwsj5w7f3qr25d3nniyv82gmczwlvpj0i0ic1431v1d0")))) (build-system gnu-build-system) (home-page "http://www.sqlite.org/") (synopsis "The SQLite database management system") diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index 2197388902..7589408e47 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -199,12 +199,6 @@ Additionally, various channel-specific options can be negotiated.") '(#:phases (alist-cons-before 'configure 'autoreconf (lambda* (#:key inputs #:allow-other-keys) - ;; The 'configure' script would want libssh 0.5.4, but that - ;; doesn't exist. - (substitute* "configure.ac" - (("0\\.5\\.4") - "0.5.3")) - (substitute* "src/Makefile.am" (("-lssh_threads" match) (string-append "-L" (assoc-ref inputs "libssh") @@ -244,3 +238,46 @@ programs written in GNU Guile interpreter. It is a wrapper to the underlying libssh library.") (home-page "https://github.com/artyom-poptsov/libguile-ssh") (license license:gpl3+))) + +(define-public corkscrew + (package + (name "corkscrew") + (version "2.0") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.agroman.net/corkscrew/corkscrew-" + version ".tar.gz")) + (sha256 (base32 + "1gmhas4va6gd70i2x2mpxpwpgww6413mji29mg282jms3jscn3qd")))) + (build-system gnu-build-system) + (arguments + ;; Replace configure phase as the ./configure script does not link + ;; CONFIG_SHELL and SHELL passed as parameters + '(#:phases + (alist-replace + 'configure + (lambda* (#:key outputs inputs system target + #:allow-other-keys #:rest args) + (let* ((configure (assoc-ref %standard-phases 'configure)) + (prefix (assoc-ref outputs "out")) + (bash (which "bash")) + ;; Set --build and --host flags as the provided config.guess + ;; is not able to detect them + (flags `(,(string-append "--prefix=" prefix) + ,(string-append "--build=" system) + ,(string-append "--host=" + (or target system))))) + (setenv "CONFIG_SHELL" bash) + (zero? (apply system* bash + (string-append "." "/configure") + flags)))) + %standard-phases))) + (home-page "http://www.agroman.net/corkscrew") + (synopsis "A tool for tunneling SSH through HTTP proxies") + (description + "Corkscrew allows creating TCP tunnels through HTTP proxies. WARNING: +At the moment only plain text authentication is supported, should you require +to use it with your HTTP proxy. Digest based authentication may be supported +in future and NTLM based authentication is most likey never be supported.") + (license license:gpl2+))) diff --git a/gnu/packages/uucp.scm b/gnu/packages/uucp.scm new file mode 100644 index 0000000000..b412bed9d9 --- /dev/null +++ b/gnu/packages/uucp.scm @@ -0,0 +1,56 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014 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 uucp) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public uucp + (package + (name "uucp") + (version "1.07") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/uucp/uucp-" + version ".tar.gz")) + (sha256 + (base32 + "0b5nhl9vvif1w3wdipjsk8ckw49jj1w85xw1mmqi3zbcpazia306")))) + (build-system gnu-build-system) + (arguments + '(#:phases (alist-replace + 'configure + (lambda* (#:key outputs #:allow-other-keys) + ;; The old 'configure' script doesn't support the arguments + ;; that we pass by default. + (setenv "CONFIG_SHELL" (which "sh")) + (let ((out (assoc-ref outputs "out"))) + (zero? (system* "./configure" + (string-append "--prefix=" out) + (string-append "--infodir=" out + "/share/info"))))) + %standard-phases))) + (home-page "http://www.gnu.org/software/uucp/uucp.html") + (synopsis "UUCP protocol implementation") + (description + "Taylor UUCP is the GNU implementation of UUCP (Unix-to-Unix Copy), a +set of utilities for remotely transferring files, email and net news +between computers.") + (license gpl2+))) diff --git a/gnu/packages/valgrind.scm b/gnu/packages/valgrind.scm index 8eb5a48190..183adb0271 100644 --- a/gnu/packages/valgrind.scm +++ b/gnu/packages/valgrind.scm @@ -28,14 +28,14 @@ (define-public valgrind (package (name "valgrind") - (version "3.8.1") + (version "3.9.0") (source (origin (method url-fetch) (uri (string-append "http://valgrind.org/downloads/valgrind-" version ".tar.bz2")) (sha256 (base32 - "1nsqk70ry3221sd62s4f0njcrncppszs4xxjcak13lxyfq2y0fs7")) + "1w6n5qvxy2ssbczcl1c2yd2ggjn3ipay2hvpn10laly2dfh73bz6")) (patches (list (search-patch "valgrind-glibc.patch"))))) (build-system gnu-build-system) (arguments diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 82ccc1fd28..3d69eee5cd 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> -;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; ;;; This file is part of GNU Guix. @@ -35,7 +35,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages python) #:use-module (gnu packages sqlite) - #:use-module (gnu packages system) + #:use-module (gnu packages admin) #:use-module (gnu packages xml) #:use-module (gnu packages emacs) #:use-module (gnu packages compression) @@ -83,10 +83,12 @@ as well as the classic centralized workflow.") (base32 "156bwqqgaw65rsvbb4wih5jfg94bxyf6p16mdwf0ky3f4ln55s2i")))) (build-system gnu-build-system) + (native-inputs + `(("native-perl" ,perl) + ("gettext" ,gnu-gettext))) (inputs `(("curl" ,curl) ("expat" ,expat) - ("gettext" ,gnu-gettext) ("openssl" ,openssl) ("perl" ,perl) ("python" ,python-2) ; CAVEAT: incompatible with python-3 according to INSTALL @@ -136,7 +138,9 @@ as well as the classic centralized workflow.") (git-cit (string-append out "/libexec/git-core/git-citool")) (git-cit* (string-append gui "/libexec/git-core/git-citool")) (git-svn (string-append out "/libexec/git-core/git-svn")) - (git-svn* (string-append svn "/libexec/git-core/git-svn"))) + (git-svn* (string-append svn "/libexec/git-core/git-svn")) + (git-sm (string-append out + "/libexec/git-core/git-submodule"))) (mkdir-p (string-append gui "/bin")) (mkdir-p (string-append gui "/libexec/git-core")) (mkdir-p (string-append svn "/libexec/git-core")) @@ -163,6 +167,12 @@ as well as the classic centralized workflow.") (,(string-append (assoc-ref inputs "subversion") "/lib")))) + ;; Tell 'git-submodule' where Perl is. + (wrap-program git-sm + `("PATH" ":" prefix + (,(string-append (assoc-ref inputs "perl") + "/bin")))) + ;; Tell 'git' to look for core programs in the user's profile. ;; This allows user to install other outputs of this package and ;; have them transparently taken into account. There's a diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index b1d1270c05..369f29f7ac 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> +;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,28 +25,29 @@ #:use-module (gnu packages compression) #:use-module (gnu packages elf) #:use-module (gnu packages fontutils) - #:use-module (gnu packages oggvorbis) #: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 xiph) #:use-module (gnu packages yasm)) (define-public ffmpeg (package (name "ffmpeg") - (version "2.1.1") + (version "2.1.3") (source (origin (method url-fetch) (uri (string-append "http://www.ffmpeg.org/releases/ffmpeg-" version ".tar.bz2")) (sha256 (base32 - "1qnspbpwa6cflsb6mkm84ay4nfx60ism6d7lgvnasidck9dmxydy")))) + "18qkdpka94rp44x17q7d2bvmw26spxf41c69nvzy31szsdzjwcqx")))) (build-system gnu-build-system) (inputs `(("fontconfig" ,fontconfig) ("freetype" ,freetype) + ("opus" ,opus) ("libtheora" ,libtheora) ("libvorbis" ,libvorbis) ("patchelf" ,patchelf) @@ -107,7 +108,6 @@ ;; --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-libopus enable Opus decoding via libopus [no] ;; --enable-libpulse enable Pulseaudio input via libpulse [no] ;; --enable-libquvi enable quvi input via libquvi [no] ;; --enable-librtmp enable RTMP[E] support via librtmp [no] @@ -142,6 +142,7 @@ "--enable-fontconfig" ;; "--enable-gnutls" ; causes test failures "--enable-libfreetype" + "--enable-libopus" "--enable-libspeex" "--enable-libtheora" "--enable-libvorbis" diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm index 0b532ae4e2..4d05567a22 100644 --- a/gnu/packages/vim.scm +++ b/gnu/packages/vim.scm @@ -25,7 +25,7 @@ #:use-module (gnu packages gawk) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) - #:use-module (gnu packages system) ; For GNU hostname + #:use-module (gnu packages admin) ; For GNU hostname #:use-module (gnu packages tcsh)) (define-public vim diff --git a/gnu/packages/wget.scm b/gnu/packages/wget.scm index 0d34a27c14..fb5fbf6343 100644 --- a/gnu/packages/wget.scm +++ b/gnu/packages/wget.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> +;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,7 +19,6 @@ (define-module (gnu packages wget) #:use-module (guix licenses) - #:use-module (gnu packages gettext) #:use-module (gnu packages gnutls) #:use-module (gnu packages perl) #:use-module (guix packages) @@ -28,7 +28,7 @@ (define-public wget (package (name "wget") - (version "1.14") + (version "1.15") (source (origin (method url-fetch) @@ -36,12 +36,12 @@ version ".tar.xz")) (sha256 (base32 - "0yqllj3nv9p3vqbdm6j4nvpjcwf1y19rq8sd966nrbd2qvvxfq8p")))) + "1yw0sk4mrs7bvga3c79rkbhxivmw8cs3b5wq3cglp1f9ai1mz2ni")))) (build-system gnu-build-system) (inputs - `(("gnutls" ,gnutls) - ("perl" ,perl) - ("gettext" ,gnu-gettext))) + `(("gnutls" ,gnutls))) + (native-inputs + `(("perl" ,perl))) (home-page "http://www.gnu.org/software/wget/") (synopsis "Non-interactive command-line utility for downloading files") (description diff --git a/gnu/packages/oggvorbis.scm b/gnu/packages/xiph.scm index 0bce731f45..0e8cb5fafc 100644 --- a/gnu/packages/oggvorbis.scm +++ b/gnu/packages/xiph.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2013 David Thompson <dthompson2@worcester.edu> +;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in> ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,7 +19,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 (gnu packages oggvorbis) +(define-module (gnu packages xiph) #:use-module (gnu packages) #:use-module (gnu packages bison) #:use-module (gnu packages compression) @@ -40,7 +41,8 @@ ao flac libkate - vorbis-tools)) + vorbis-tools + opus)) (define libogg (package @@ -155,7 +157,7 @@ stereo encoding, and voice activity detection.") ;; FIXME: Add further backends, see the summary printed after configure. ;; XXX: Should back-ends be pushed to different outputs? For instance, ;; "out" would include only the ALSA back-end, while "pulse" would - ;; contains 'lib/ao/plugins-4/libpulse.*'. + ;; contain 'lib/ao/plugins-4/libpulse.*'. (inputs `(("pkg-config" ,pkg-config) ("alsa-lib" ,alsa-lib) ("pulseaudio" ,pulseaudio))) @@ -278,3 +280,26 @@ ogginfo, to obtain information (tags, bitrate, length, etc.) about an ogg vorbis file.") (license license:gpl2) (home-page "http://xiph.org/vorbis/"))) + +(define opus + (package + (name "opus") + (version "1.1") + (source (origin + (method url-fetch) + (uri (string-append + "http://downloads.xiph.org/releases/opus/opus-" version + ".tar.gz")) + (sha256 + (base32 + "158xprn2086arvdib3vbbygz7z6jqkw2nci7nlywzzwallap0wmr")))) + (build-system gnu-build-system) + (synopsis "highly versatile audio codec") + (description + "Opus is a totally open, royalty-free, highly versatile audio codec. Opus +is unmatched for interactive speech and music transmission over the Internet, +but is also intended for storage and streaming applications. It is +standardized by the Internet Engineering Task Force (IETF) as RFC 6716 which +incorporated technology from Skype's SILK codec and Xiph.Org's CELT codec.") + (license license:bsd-3) + (home-page "http://www.opus-codec.org/"))) diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index dfdd82c8b8..6c17170eef 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -1257,10 +1257,12 @@ tracking.") (base32 "1gdv6559cdz1lfw73x7wsvax1fkvphmayrymprljhyyb5nwk5kkz")))) (build-system gnu-build-system) + (propagated-inputs + ;; xft.pc refers to 'xrender'. + `(("libxrender" ,libxrender))) (inputs `(("libx11" ,libx11) ("xproto" ,xproto) - ("libxrender" ,libxrender) ("freetype" ,freetype) ("fontconfig" ,fontconfig))) (native-inputs diff --git a/gnu/system.scm b/gnu/system.scm index 0516112553..6fd753f8fd 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -25,7 +25,7 @@ #:use-module (gnu packages linux-initrd) #:use-module (gnu packages base) #:use-module (gnu packages bash) - #:use-module (gnu packages system) + #:use-module (gnu packages admin) #:use-module (gnu packages package-management) #:use-module (gnu system dmd) #:use-module (gnu system grub) @@ -288,7 +288,7 @@ alias ll='ls -l' (append-map service-pam-services services)))) (bash-file (package-file bash "bin/bash")) - (dmd-file (package-file (@ (gnu packages system) dmd) "bin/dmd")) + (dmd-file (package-file (@ (gnu packages admin) dmd) "bin/dmd")) (accounts -> (cons (user-account (name "root") (password "") diff --git a/gnu/system/dmd.scm b/gnu/system/dmd.scm index 7cd5f05f78..2143b00426 100644 --- a/gnu/system/dmd.scm +++ b/gnu/system/dmd.scm @@ -23,7 +23,7 @@ #:use-module (guix records) #:use-module ((gnu packages base) #:select (glibc-final)) - #:use-module ((gnu packages system) + #:use-module ((gnu packages admin) #:select (mingetty inetutils shadow)) #:use-module ((gnu packages package-management) #:select (guix)) diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index ca24c3df2b..2a85a20ebb 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -21,7 +21,7 @@ #:use-module (guix records) #:use-module (guix packages) #:use-module (guix monads) - #:use-module ((gnu packages system) + #:use-module ((gnu packages admin) #:select (shadow)) #:use-module (gnu packages bash) #:use-module (srfi srfi-1) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 5932a22b99..e75c09d859 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -39,7 +39,7 @@ #:use-module (gnu packages package-management) #:use-module ((gnu packages make-bootstrap) #:select (%guile-static-stripped)) - #:use-module (gnu packages system) + #:use-module (gnu packages admin) #:use-module (gnu system shadow) #:use-module (gnu system linux) diff --git a/guix/build/linux-initrd.scm b/guix/build/linux-initrd.scm index cbdb363b4e..ae18a16e11 100644 --- a/guix/build/linux-initrd.scm +++ b/guix/build/linux-initrd.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -95,7 +95,9 @@ ;; Other useful nodes. (mknod (scope "dev/null") 'char-special #o666 (device-number 1 3)) - (mknod (scope "dev/zero") 'char-special #o666 (device-number 1 5))) + (mknod (scope "dev/zero") 'char-special #o666 (device-number 1 5)) + (chmod (scope "dev/null") #o666) + (chmod (scope "dev/zero") #o666)) (define %host-qemu-ipv4-address (inet-pton AF_INET "10.0.2.10")) diff --git a/guix/config.scm.in b/guix/config.scm.in index 3a5c50e00a..5edb4ced30 100644 --- a/guix/config.scm.in +++ b/guix/config.scm.in @@ -24,6 +24,7 @@ %store-directory %state-directory %config-directory + %guix-register-program %system %libgcrypt %nixpkgs @@ -62,6 +63,10 @@ ;; This must match `NIX_CONF_DIR' as defined in `daemon.am'. (or (getenv "NIX_CONF_DIR") "@guix_sysconfdir@/guix")) +(define %guix-register-program + ;; The 'guix-register' program. + (or (getenv "GUIX_REGISTER") "@guix_sbindir@/guix-register")) + (define %system "@guix_system@") diff --git a/guix/derivations.scm b/guix/derivations.scm index 3d9f0affbf..cc8e37c973 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -532,7 +532,8 @@ the derivation called NAME with hash HASH." (system (%current-system)) (env-vars '()) (inputs '()) (outputs '("out")) hash hash-algo hash-mode - references-graphs) + references-graphs + local-build?) "Build a derivation with the given arguments, and return the resulting <derivation> object. When HASH, HASH-ALGO, and HASH-MODE are given, a fixed-output derivation is created---i.e., one whose result is known in @@ -540,7 +541,11 @@ advance, such as a file download. When REFERENCES-GRAPHS is true, it must be a list of file name/store path pairs. In that case, the reference graph of each store path is exported in -the build environment in the corresponding file, in a simple text format." +the build environment in the corresponding file, in a simple text format. + +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." (define (add-output-paths drv) ;; Return DRV with an actual store path for each of its output and the ;; corresponding environment variable. @@ -571,16 +576,20 @@ the build environment in the corresponding file, in a simple text format." ;; Some options are passed to the build daemon via the env. vars of ;; derivations (urgh!). We hide that from our API, but here is the place ;; where we kludgify those options. - (match references-graphs - (((file . path) ...) - (let ((value (map (cut string-append <> " " <>) - file path))) - ;; XXX: This all breaks down if an element of FILE or PATH contains - ;; white space. - `(("exportReferencesGraph" . ,(string-join value " ")) - ,@env-vars))) - (#f - env-vars))) + (let ((env-vars (if local-build? + `(("preferLocalBuild" . "1") + ,@env-vars) + env-vars))) + (match references-graphs + (((file . path) ...) + (let ((value (map (cut string-append <> " " <>) + file path))) + ;; XXX: This all breaks down if an element of FILE or PATH contains + ;; white space. + `(("exportReferencesGraph" . ,(string-join value " ")) + ,@env-vars))) + (#f + env-vars)))) (define (env-vars-with-empty-outputs env-vars) ;; Return a variant of ENV-VARS where each OUTPUTS is associated with an @@ -904,7 +913,8 @@ they can refer to each other." (env-vars '()) (modules '()) guile-for-build - references-graphs) + references-graphs + local-build?) "Return a derivation that executes Scheme expression EXP as a builder for derivation NAME. INPUTS must be a list of (NAME DRV-PATH SUB-DRV) tuples; when SUB-DRV is omitted, \"out\" is assumed. MODULES is a list @@ -923,7 +933,8 @@ EXP returns #f, the build is considered to have failed. EXP is built using GUILE-FOR-BUILD (a derivation). When GUILE-FOR-BUILD is omitted or is #f, the value of the `%guile-for-build' fluid is used instead. -See the `derivation' procedure for the meaning of REFERENCES-GRAPHS." +See the `derivation' procedure for the meaning of REFERENCES-GRAPHS and +LOCAL-BUILD?." (define guile-drv (or guile-for-build (%guile-for-build))) @@ -1046,4 +1057,5 @@ See the `derivation' procedure for the meaning of REFERENCES-GRAPHS." #:hash hash #:hash-algo hash-algo #:outputs outputs - #:references-graphs references-graphs))) + #:references-graphs references-graphs + #:local-build? local-build?))) diff --git a/guix/hash.scm b/guix/hash.scm index 92ecaf78d5..fb85f47586 100644 --- a/guix/hash.scm +++ b/guix/hash.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,7 +25,8 @@ #:use-module (srfi srfi-11) #:export (sha256 open-sha256-port - port-sha256)) + port-sha256 + open-sha256-input-port)) ;;; Commentary: ;;; @@ -128,4 +129,41 @@ output port." (close-port out) (get))) +(define (open-sha256-input-port port) + "Return an input port that wraps PORT and a thunk to get the hash of all the +data read from PORT. The thunk always returns the same value." + (define md + (open-sha256-md)) + + (define (read! bv start count) + (let ((n (get-bytevector-n! port bv start count))) + (if (eof-object? n) + 0 + (begin + (unless digest + (let ((ptr (bytevector->pointer bv start))) + (md-write md ptr n))) + n)))) + + (define digest #f) + + (define (finalize!) + (let ((ptr (md-read md 0))) + (set! digest (bytevector-copy (pointer->bytevector ptr 32))) + (md-close md))) + + (define (get-hash) + (unless digest + (finalize!)) + digest) + + (define (unbuffered port) + ;; Guile <= 2.0.9 does not support 'setvbuf' on custom binary input ports. + ;; If you get a wrong-type-arg error here, the fix is to upgrade Guile. :-) + (setvbuf port _IONBF) + port) + + (values (unbuffered (make-custom-binary-input-port "sha256" read! #f #f #f)) + get-hash)) + ;;; hash.scm ends here diff --git a/guix/licenses.scm b/guix/licenses.scm index c0a0e60b36..5f1b3c16cf 100644 --- a/guix/licenses.scm +++ b/guix/licenses.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; @@ -31,6 +31,7 @@ expat freetype gpl1 gpl1+ gpl2 gpl2+ gpl3 gpl3+ + fdl1.3+ isc ijg ibmpl1.0 @@ -161,6 +162,11 @@ which may be a file:// URI pointing the package's tree." "https://www.gnu.org/licenses/gpl.html" "https://www.gnu.org/licenses/license-list#GNUGPLv3")) +(define fdl1.3+ + (license "FDL 1.3+" + "https://www.gnu.org/licenses/fdl.html" + "https://www.gnu.org/licenses/license-list#FDL")) + (define isc (license "ISC" "http://directory.fsf.org/wiki/License:ISC" diff --git a/guix/nar.scm b/guix/nar.scm index ea119a25fe..4bc2deb229 100644 --- a/guix/nar.scm +++ b/guix/nar.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,23 +19,40 @@ (define-module (guix nar) #:use-module (guix utils) #:use-module (guix serialization) - #:use-module ((guix build utils) #:select (with-directory-excursion)) + #:use-module ((guix build utils) + #:select (delete-file-recursively with-directory-excursion)) + #:use-module (guix store) + #:use-module (guix ui) ; for '_' + #:use-module (guix hash) + #:use-module (guix pki) + #:use-module (guix pk-crypto) #:use-module (rnrs bytevectors) #:use-module (rnrs io ports) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:use-module (ice-9 ftw) #:use-module (ice-9 match) #:export (nar-error? + nar-error-port + nar-error-file + nar-read-error? - nar-read-error-file - nar-read-error-port nar-read-error-token + nar-invalid-hash-error? + nar-invalid-hash-error-expected + nar-invalid-hash-error-actual + + nar-signature-error? + nar-signature-error-signature + write-file - restore-file)) + restore-file + + restore-file-set)) ;;; Comment: ;;; @@ -44,15 +61,24 @@ ;;; Code: (define-condition-type &nar-error &error ; XXX: inherit from &nix-error ? - nar-error?) + nar-error? + (file nar-error-file) ; file we were restoring, or #f + (port nar-error-port)) ; port from which we read (define-condition-type &nar-read-error &nar-error nar-read-error? - (port nar-read-error-port) ; port from which we read - (file nar-read-error-file) ; file we were restoring, or #f (token nar-read-error-token)) ; faulty token, or #f +(define-condition-type &nar-signature-error &nar-error + nar-signature-error? + (signature nar-signature-error-signature)) ; faulty signature or #f +(define-condition-type &nar-invalid-hash-error &nar-signature-error + nar-invalid-hash-error? + (expected nar-invalid-hash-error-expected) ; expected hash (a bytevector) + (actual nar-invalid-hash-error-actual)) ; actual hash + + (define (dump in out size) "Copy SIZE bytes from IN to OUT." (define buf-size 65536) @@ -239,4 +265,191 @@ Restore it as FILE." (&message (message "unsupported nar entry type")) (&nar-read-error (port port) (file file) (token x)))))))) + +;;; +;;; Restoring a file set into the store. +;;; + +;; The code below accesses the store directly and is meant to be run from +;; "build hooks", which cannot invoke the daemon's 'import-paths' RPC since +;; (1) the locks on the files to be restored as already held, and (2) the +;; $NIX_HELD_LOCKS hackish environment variable cannot be set. +;; +;; So we're really duplicating that functionality of the daemon (well, until +;; most of the daemon is in Scheme :-)). But note that we do use a couple of +;; RPCs for functionality not available otherwise, like 'valid-path?'. + +(define (lock-store-file file) + "Acquire exclusive access to FILE, a store file." + (call-with-output-file (string-append file ".lock") + (cut fcntl-flock <> 'write-lock))) + +(define (unlock-store-file file) + "Release access to FILE." + (call-with-input-file (string-append file ".lock") + (cut fcntl-flock <> 'unlock))) + +(define* (finalize-store-file source target + #:key (references '()) deriver (lock? #t)) + "Rename SOURCE to TARGET and register TARGET as a valid store item, with +REFERENCES and DERIVER. When LOCK? is true, acquire exclusive locks on TARGET +before attempting to register it; otherwise, assume TARGET's locks are already +held." + + ;; XXX: Currently we have to call out to the daemon to check whether TARGET + ;; is valid. + (with-store store + (unless (valid-path? store target) + (when lock? + (lock-store-file target)) + + (unless (valid-path? store target) + ;; If FILE already exists, delete it (it's invalid anyway.) + (when (file-exists? target) + (delete-file-recursively target)) + + ;; Install the new TARGET. + (rename-file source target) + + ;; Register TARGET. As a side effect, it resets the timestamps of all + ;; its files, recursively. However, it doesn't attempt to deduplicate + ;; its files like 'importPaths' does (FIXME). + (register-path target + #:references references + #:deriver deriver)) + + (when lock? + (unlock-store-file target))))) + +(define (temporary-store-directory) + "Return the file name of a temporary directory created in the store that is +protected from garbage collection." + (let* ((template (string-append (%store-prefix) "/guix-XXXXXX")) + (port (mkstemp! template))) + (close-port port) + (with-store store + (add-temp-root store template)) + + ;; There's a small window during which the GC could delete the file. Try + ;; again if that happens. + (if (file-exists? template) + (begin + ;; It's up to the caller to create that file or directory. + (delete-file template) + template) + (temporary-store-directory)))) + +(define* (restore-file-set port + #:key (verify-signature? #t) (lock? #t) + (log-port (current-error-port))) + "Restore the file set read from PORT to the store. The format of the data +on PORT must be as created by 'export-paths'---i.e., a series of Nar-formatted +archives with interspersed meta-data joining them together, possibly with a +digital signature at the end. Log progress to LOG-PORT. Return the list of +files restored. + +When LOCK? is #f, assume locks for the files to be restored are already held. +This is the case when the daemon calls a build hook. + +Note that this procedure accesses the store directly, so it's only meant to be +used by the daemon's build hooks since they cannot call back to the daemon +while the locks are held." + (define %export-magic + ;; Number used to identify genuine file set archives. + #x4558494e) + + (define port* + ;; Keep that one around, for error conditions. + port) + + (define (assert-valid-signature signature hash file) + ;; Bail out if SIGNATURE, an sexp, doesn't match HASH, a bytevector + ;; containing the expected hash for FILE. + (let* ((signature (catch 'gcry-error + (lambda () + (string->canonical-sexp signature)) + (lambda (err . _) + (raise (condition + (&message + (message "signature is not a valid \ +s-expression")) + (&nar-signature-error + (file file) + (signature signature) (port port))))))) + (subject (signature-subject signature)) + (data (signature-signed-data signature))) + (if (and data subject) + (if (authorized-key? subject) + (if (equal? (hash-data->bytevector data) hash) + (unless (valid-signature? signature) + (raise (condition + (&message (message "invalid signature")) + (&nar-signature-error + (file file) (signature signature) (port port))))) + (raise (condition (&message (message "invalid hash")) + (&nar-invalid-hash-error + (port port) (file file) + (signature signature) + (expected (hash-data->bytevector data)) + (actual hash))))) + (raise (condition (&message (message "unauthorized public key")) + (&nar-signature-error + (signature signature) (file file) (port port))))) + (raise (condition + (&message (message "corrupt signature data")) + (&nar-signature-error + (signature signature) (file file) (port port))))))) + + (let loop ((n (read-long-long port)) + (files '())) + (case n + ((0) + (reverse files)) + ((1) + (let-values (((port get-hash) + (open-sha256-input-port port))) + (let ((temp (temporary-store-directory))) + (restore-file port temp) + (let ((magic (read-int port))) + (unless (= magic %export-magic) + (raise (condition + (&message (message "corrupt file set archive")) + (&nar-read-error + (port port*) (file #f) (token #f)))))) + + (let ((file (read-store-path port)) + (refs (read-store-path-list port)) + (deriver (read-string port)) + (hash (get-hash)) + (has-sig? (= 1 (read-int port)))) + (format log-port + (_ "importing file or directory '~a'...~%") + file) + + (let ((sig (and has-sig? (read-string port)))) + (when verify-signature? + (if sig + (begin + (assert-valid-signature sig hash file) + (format log-port + (_ "found valid signature for '~a'~%") + file) + (finalize-store-file temp file + #:references refs + #:deriver deriver + #:lock? lock?) + (loop (read-long-long port) + (cons file files))) + (raise (condition + (&message (message "imported file lacks \ +a signature")) + (&nar-signature-error + (port port*) (file file) (signature #f))))))))))) + (else + ;; Neither 0 nor 1. + (raise (condition + (&message (message "invalid inter-file archive mark")) + (&nar-read-error + (port port) (file #f) (token #f)))))))) + ;;; nar.scm ends here diff --git a/guix/pki.scm b/guix/pki.scm index 5e4dbadd35..4b90b65a13 100644 --- a/guix/pki.scm +++ b/guix/pki.scm @@ -29,8 +29,12 @@ current-acl public-keys->acl acl->public-keys + authorized-key? + signature-sexp - authorized-key?)) + signature-subject + signature-signed-data + valid-signature?)) ;;; Commentary: ;;; @@ -136,4 +140,21 @@ PUBLIC-KEY (see <http://theworld.com/~cme/spki.txt> for examples.)" (canonical-sexp->string (sign data secret-key)) (canonical-sexp->string public-key)))) +(define (signature-subject sig) + "Return the signer's public key for SIG." + (find-sexp-token sig 'public-key)) + +(define (signature-signed-data sig) + "Return the signed data from SIG, typically an sexp such as + (hash \"sha256\" #...#)." + (find-sexp-token sig 'data)) + +(define (valid-signature? sig) + "Return #t if SIG is valid." + (let* ((data (signature-signed-data sig)) + (signature (find-sexp-token sig 'sig-val)) + (public-key (signature-subject sig))) + (and data signature + (verify signature data public-key)))) + ;;; pki.scm ends here diff --git a/guix/profiles.scm b/guix/profiles.scm index 9b5c5f515c..1ff6c97f9f 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; ;;; This file is part of GNU Guix. @@ -238,8 +238,6 @@ the given MANIFEST." (let ((output (assoc-ref %outputs "out")) (inputs (map cdr %build-inputs))) - (format #t "building profile '~a' with ~a packages...~%" - output (length inputs)) (union-build output inputs #:log-port (%make-void-port "w")) (call-with-output-file (string-append output "/manifest") diff --git a/guix/scripts/authenticate.scm b/guix/scripts/authenticate.scm index c7a14f7a8b..27580dedff 100644 --- a/guix/scripts/authenticate.scm +++ b/guix/scripts/authenticate.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -72,23 +72,21 @@ ;; Read the signature as produced above, check whether its public key is ;; authorized, and verify the signature, and print the signed data to ;; stdout upon success. - (let* ((sig+data (read-canonical-sexp signature-file)) - (public-key (find-sexp-token sig+data 'public-key)) - (data (find-sexp-token sig+data 'data)) - (signature (find-sexp-token sig+data 'sig-val))) - (if (and data signature) - (if (authorized-key? public-key) - (if (verify signature data public-key) - (begin - (display (bytevector->base16-string - (hash-data->bytevector data))) + (let* ((signature (read-canonical-sexp signature-file)) + (subject (signature-subject signature)) + (data (signature-signed-data signature))) + (if (and data subject) + (if (authorized-key? subject) + (if (valid-signature? signature) + (let ((hash (hash-data->bytevector data))) + (display (bytevector->base16-string hash)) #t) ; success (leave (_ "error: invalid signature: ~a~%") (canonical-sexp->string signature))) (leave (_ "error: unauthorized public key: ~a~%") - (canonical-sexp->string public-key))) + (canonical-sexp->string subject))) (leave (_ "error: corrupt signature data: ~a~%") - (canonical-sexp->string sig+data))))) + (canonical-sexp->string signature))))) (("--help") (display (_ "Usage: guix authenticate OPTION... Sign or verify the signature on the given file. This tool is meant to diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm new file mode 100644 index 0000000000..d919ede3c7 --- /dev/null +++ b/guix/scripts/offload.scm @@ -0,0 +1,380 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014 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 scripts offload) + #:use-module (guix config) + #:use-module (guix records) + #:use-module (guix store) + #:use-module (guix derivations) + #:use-module (guix nar) + #:use-module (guix utils) + #:use-module ((guix build utils) #:select (which)) + #:use-module (guix ui) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) + #:use-module (ice-9 popen) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 match) + #:use-module (ice-9 regex) + #:use-module (ice-9 format) + #:use-module (rnrs io ports) + #:export (build-machine + build-requirements + guix-offload)) + +;;; Commentary: +;;; +;;; Attempt to offload builds to the machines listed in +;;; /etc/guix/machines.scm, transferring missing dependencies over SSH, and +;;; retrieving the build output(s) over SSH upon success. +;;; +;;; This command should not be used directly; instead, it is called on-demand +;;; by the daemon, unless it was started with '--no-build-hook' or a client +;;; inhibited build hooks. +;;; +;;; Code: + + +(define-record-type* <build-machine> + build-machine make-build-machine + build-machine? + (name build-machine-name) ; string + (system build-machine-system) ; string + (user build-machine-user) ; string + (private-key build-machine-private-key ; file name + (default (user-lsh-private-key))) + (parallel-builds build-machine-parallel-builds ; number + (default 1)) + (speed build-machine-speed ; inexact real + (default 1.0)) + (features build-machine-features ; list of strings + (default '()))) + +(define-record-type* <build-requirements> + build-requirements make-build-requirements + build-requirements? + (system build-requirements-system) ; string + (features build-requirements-features ; list of strings + (default '()))) + +(define %machine-file + ;; File that lists machines available as build slaves. + (string-append %config-directory "/machines.scm")) + +(define %lsh-command + "lsh") + +(define %lshg-command + ;; FIXME: 'lshg' fails to pass large amounts of data, see + ;; <http://lists.lysator.liu.se/pipermail/lsh-bugs/2014q1/000639.html>. + "lsh") + +(define (user-lsh-private-key) + "Return the user's default lsh private key, or #f if it could not be +determined." + (and=> (getenv "HOME") + (cut string-append <> "/.lsh/identity"))) + +(define %user-module + ;; Module in which the machine description file is loaded. + (let ((module (make-fresh-user-module))) + (module-use! module (resolve-interface '(guix scripts offload))) + module)) + +(define* (build-machines #:optional (file %machine-file)) + "Read the list of build machines from FILE and return it." + (catch #t + (lambda () + ;; Avoid ABI incompatibility with the <build-machine> record. + (set! %fresh-auto-compile #t) + + (save-module-excursion + (lambda () + (set-current-module %user-module) + (primitive-load %machine-file)))) + (lambda args + (match args + (('system-error . _) + (let ((err (system-error-errno args))) + ;; Silently ignore missing file since this is a common case. + (if (= ENOENT err) + '() + (leave (_ "failed to open machine file '~a': ~a~%") + %machine-file (strerror err))))) + (_ + (leave (_ "failed to load machine file '~a': ~s~%") + %machine-file args)))))) + +(define (open-ssh-gateway machine) + "Initiate an SSH connection gateway to MACHINE, and return the PID of the +running lsh gateway upon success, or #f on failure." + (catch 'system-error + (lambda () + (let* ((port (open-pipe* OPEN_READ %lsh-command + "-l" (build-machine-user machine) + "-i" (build-machine-private-key machine) + ;; XXX: With lsh 2.1, passing '--write-pid' + ;; last causes the PID not to be printed. + "--write-pid" "--gateway" "--background" "-z" + (build-machine-name machine))) + (line (read-line port)) + (status (close-pipe port))) + (if (zero? status) + (let ((pid (string->number line))) + (if (integer? pid) + pid + (begin + (warning (_ "'~a' did not write its PID on stdout: ~s~%") + %lsh-command line) + #f))) + (begin + (warning (_ "failed to initiate SSH connection to '~a':\ + '~a' exited with ~a~%") + (build-machine-name machine) + %lsh-command + (status:exit-val status)) + #f)))) + (lambda args + (leave (_ "failed to execute '~a': ~a~%") + %lsh-command (strerror (system-error-errno args)))))) + +(define (remote-pipe machine mode command) + "Run COMMAND on MACHINE, assuming an lsh gateway has been set up." + (catch 'system-error + (lambda () + (apply open-pipe* mode %lshg-command + "-l" (build-machine-user machine) "-z" + (build-machine-name machine) + command)) + (lambda args + (warning (_ "failed to execute '~a': ~a~%") + %lshg-command (strerror (system-error-errno args))) + #f))) + +(define* (offload drv machine + #:key print-build-trace? (max-silent-time 3600) + (build-timeout 7200)) + "Perform DRV on MACHINE, assuming DRV and its prerequisites are available +there. Return a read pipe from where to read the build log." + (format (current-error-port) "offloading '~a' to '~a'...~%" + (derivation-file-name drv) (build-machine-name machine)) + (format (current-error-port) "@ build-remote ~a ~a~%" + (derivation-file-name drv) (build-machine-name machine)) + + ;; FIXME: Protect DRV from garbage collection on MACHINE. + (let ((pipe (remote-pipe machine OPEN_READ + `("guix" "build" + ;; FIXME: more options + ,(format #f "--max-silent-time=~a" + max-silent-time) + ,(derivation-file-name drv))))) + pipe)) + +(define (send-files files machine) + "Send the subset of FILES that's missing to MACHINE's store. Return #t on +success, #f otherwise." + (define (missing-files files) + ;; Return the subset of FILES not already on MACHINE. + (let* ((files (format #f "~{~a~%~}" files)) + (missing (filtered-port + (list (which %lshg-command) + "-l" (build-machine-user machine) + "-i" (build-machine-private-key machine) + (build-machine-name machine) + "guix" "archive" "--missing") + (open-input-string files)))) + (string-tokenize (get-string-all missing)))) + + (with-store store + (guard (c ((nix-protocol-error? c) + (warning (_ "failed to export files for '~a': ~s~%") + (build-machine-name machine) + c) + (false-if-exception (close-pipe pipe)) + #f)) + + ;; Compute the subset of FILES missing on MACHINE, and send them in + ;; topologically sorted order so that they can actually be imported. + (let ((files (missing-files (topologically-sorted store files))) + (pipe (remote-pipe machine OPEN_WRITE + '("guix" "archive" "--import")))) + (format #t (_ "sending ~a store files to '~a'...~%") + (length files) (build-machine-name machine)) + (catch 'system-error + (lambda () + (export-paths store files pipe)) + (lambda args + (warning (_ "failed while exporting files to '~a': ~a~%") + (build-machine-name machine) + (strerror (system-error-errno args))))) + (zero? (close-pipe pipe)))))) + +(define (retrieve-files files machine) + "Retrieve FILES from MACHINE's store, and import them." + (define host + (build-machine-name machine)) + + (let ((pipe (remote-pipe machine OPEN_READ + `("guix" "archive" "--export" ,@files)))) + (and pipe + (with-store store + (guard (c ((nix-protocol-error? c) + (warning (_ "failed to import files from '~a': ~s~%") + host c) + #f)) + (format (current-error-port) "retrieving ~a files from '~a'...~%" + (length files) host) + + ;; We cannot use the 'import-paths' RPC here because we already + ;; hold the locks for FILES. + (restore-file-set pipe + #:log-port (current-error-port) + #:lock? #f) + + (zero? (close-pipe pipe))))))) + +(define (machine-matches? machine requirements) + "Return #t if MACHINE matches REQUIREMENTS." + (and (string=? (build-requirements-system requirements) + (build-machine-system machine)) + (lset<= string=? + (build-requirements-features requirements) + (build-machine-features machine)))) + +(define (machine-faster? m1 m2) + "Return #t if M1 is faster than M2." + (> (build-machine-speed m1) (build-machine-speed m2))) + +(define (choose-build-machine requirements machines) + "Return the best machine among MACHINES fulfilling REQUIREMENTS, or #f." + ;; FIXME: Take machine load into account, and/or shuffle MACHINES. + (let ((machines (sort (filter (cut machine-matches? <> requirements) + machines) + machine-faster?))) + (match machines + ((head . _) + head) + (_ #f)))) + +(define* (process-request wants-local? system drv features + #:key + print-build-trace? (max-silent-time 3600) + (build-timeout 7200)) + "Process a request to build DRV." + (let* ((local? (and wants-local? (string=? system (%current-system)))) + (reqs (build-requirements + (system system) + (features features))) + (machine (choose-build-machine reqs (build-machines)))) + (if machine + (match (open-ssh-gateway machine) + ((? integer? pid) + (display "# accept\n") + (let ((inputs (string-tokenize (read-line))) + (outputs (string-tokenize (read-line)))) + (when (send-files (cons (derivation-file-name drv) inputs) + machine) + (let ((log (offload drv machine + #:print-build-trace? print-build-trace? + #:max-silent-time max-silent-time + #:build-timeout build-timeout))) + (let loop ((line (read-line log))) + (if (eof-object? line) + (close-pipe log) + (begin + (display line) (newline) + (loop (read-line log)))))) + (retrieve-files outputs machine))) + (format (current-error-port) "done with offloaded '~a'~%" + (derivation-file-name drv)) + (kill pid SIGTERM)) + (#f + (display "# decline\n"))) + (display "# decline\n")))) + +(define-syntax-rule (with-nar-error-handling body ...) + "Execute BODY with any &nar-error suitably reported to the user." + (guard (c ((nar-error? c) + (let ((file (nar-error-file c))) + (if (condition-has-type? c &message) + (leave (_ "while importing file '~a': ~a~%") + file (gettext (condition-message c))) + (leave (_ "failed to import file '~a'~%") + file))))) + body ...)) + + +;;; +;;; Entry point. +;;; + +(define (guix-offload . args) + (define request-line-rx + ;; The request format. See 'tryBuildHook' method in build.cc. + (make-regexp "([01]) ([a-z0-9_-]+) (/[[:graph:]]+.drv) ([[:graph:]]*)")) + + (define not-coma + (char-set-complement (char-set #\,))) + + ;; Make sure $HOME really corresponds to the current user. This is + ;; necessary since lsh uses that to determine the location of the yarrow + ;; seed file, and fails if it's owned by someone else. + (and=> (passwd:dir (getpw (getuid))) + (cut setenv "HOME" <>)) + + (match args + ((system max-silent-time print-build-trace? build-timeout) + (let ((max-silent-time (string->number max-silent-time)) + (build-timeout (string->number build-timeout)) + (print-build-trace? (string=? print-build-trace? "1"))) + (parameterize ((%current-system system)) + (let loop ((line (read-line))) + (unless (eof-object? line) + (cond ((regexp-exec request-line-rx line) + => + (lambda (match) + (with-nar-error-handling + (process-request (equal? (match:substring match 1) "1") + (match:substring match 2) ; system + (call-with-input-file + (match:substring match 3) + read-derivation) + (string-tokenize + (match:substring match 4) not-coma) + #:print-build-trace? print-build-trace? + #:max-silent-time max-silent-time + #:build-timeout build-timeout)))) + (else + (leave (_ "invalid request line: ~s~%") line))) + (loop (read-line))))))) + (("--version") + (show-version-and-exit "guix offload")) + (("--help") + (format #t (_ "Usage: guix offload SYSTEM PRINT-BUILD-TRACE +Process build offload requests written on the standard input, possibly +offloading builds to the machines listed in '~a'.~%") + %machine-file) + (display (_ " +This tool is meant to be used internally by 'guix-daemon'.\n")) + (show-bug-report-information)) + (x + (leave (_ "invalid arguments: ~{~s ~}~%") x)))) + +;;; offload.scm ends here diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 04393abc9a..d41a83de8a 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -1032,8 +1032,9 @@ more information.~%")) (('search regexp) (let ((regexp (make-regexp regexp regexp/icase))) - (for-each (cute package->recutils <> (current-output-port)) - (find-packages-by-description regexp)) + (leave-on-EPIPE + (for-each (cute package->recutils <> (current-output-port)) + (find-packages-by-description regexp))) #t)) (('search-paths) diff --git a/guix/scripts/substitute-binary.scm b/guix/scripts/substitute-binary.scm index 901b3fb064..3aaa1c4284 100755 --- a/guix/scripts/substitute-binary.scm +++ b/guix/scripts/substitute-binary.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -486,6 +486,29 @@ Internal tool to substitute a pre-built binary to a local build.\n")) "Implement the build daemon's substituter protocol." (mkdir-p %narinfo-cache-directory) (maybe-remove-expired-cached-narinfo) + + ;; Starting from commit 22144afa in Nix, we are allowed to bail out directly + ;; when we know we cannot substitute, but we must emit a newline on stdout + ;; when everything is alright. + (let ((uri (string->uri %cache-url))) + (case (uri-scheme uri) + ((http) + ;; Exit gracefully if there's no network access. + (let ((host (uri-host uri))) + (catch 'getaddrinfo-error + (lambda () + (getaddrinfo host)) + (lambda (key error) + (warning (_ "failed to look up host '~a' (~a), \ +substituter disabled~%") + host (gai-strerror error)) + (exit 0))))) + (else #t))) + + ;; Say hello (see above.) + (newline) + (force-output (current-output-port)) + (with-networking (match args (("--query") diff --git a/guix/store.scm b/guix/store.scm index 1012480b39..eca0de7d97 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -33,6 +33,7 @@ #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (ice-9 vlist) + #:use-module (ice-9 popen) #:export (%daemon-socket-file nix-server? @@ -52,6 +53,7 @@ open-connection close-connection + with-store set-build-options valid-path? query-path-hash @@ -74,6 +76,7 @@ references requisites referrers + topologically-sorted valid-derivers query-derivation-outputs live-paths @@ -85,6 +88,8 @@ current-build-output-port + register-path + %store-prefix store-path? direct-store-path? @@ -320,6 +325,17 @@ operate, should the disk become full. Return a server object." "Close the connection to SERVER." (close (nix-server-socket server))) +(define-syntax-rule (with-store store exp ...) + "Bind STORE to an open connection to the store and evaluate EXPs; +automatically close the store when the dynamic extent of EXP is left." + (let ((store (open-connection))) + (dynamic-wind + (const #f) + (lambda () + exp ...) + (lambda () + (false-if-exception (close-connection store)))))) + (define current-build-output-port ;; The port where build output is sent. (make-parameter (current-error-port))) @@ -360,11 +376,11 @@ encoding conversion errors." (nix-server-socket server)) ;; magic cookies from worker-protocol.hh - (define %stderr-next #x6f6c6d67) - (define %stderr-read #x64617461) ; data needed from source - (define %stderr-write #x64617416) ; data for sink - (define %stderr-last #x616c7473) - (define %stderr-error #x63787470) + (define %stderr-next #x6f6c6d67) ; "olmg", build log + (define %stderr-read #x64617461) ; "data", data needed from source + (define %stderr-write #x64617416) ; "dat\x16", data for sink + (define %stderr-last #x616c7473) ; "alts", we're done + (define %stderr-error #x63787470) ; "cxtp", error reporting (let ((k (read-int p))) (cond ((= k %stderr-write) @@ -574,6 +590,40 @@ SEED." references, recursively)." (fold-path store cons '() path)) +(define (topologically-sorted store paths) + "Return a list containing PATHS and all their references sorted in +topological order." + (define (traverse) + ;; Do a simple depth-first traversal of all of PATHS. + (let loop ((paths paths) + (visited vlist-null) + (result '())) + (define (visit n) + (vhash-cons n #t visited)) + + (define (visited? n) + (vhash-assoc n visited)) + + (match paths + ((head tail ...) + (if (visited? head) + (loop tail visited result) + (call-with-values + (lambda () + (loop (references store head) + (visit head) + result)) + (lambda (visited result) + (loop tail + visited + (cons head result)))))) + (() + (values visited result))))) + + (call-with-values traverse + (lambda (_ result) + (reverse result)))) + (define referrers (operation (query-referrers (store-path path)) "Return the list of path that refer to PATH." @@ -694,6 +744,28 @@ is true." (and (export-path server head port #:sign? sign?) (loop tail))))))) +(define* (register-path path + #:key (references '()) deriver) + "Register PATH as a valid store file, with REFERENCES as its list of +references, and DERIVER as its deriver (.drv that led to it.) Return #t on +success. + +Use with care as it directly modifies the store! This is primarily meant to +be used internally by the daemon's build hook." + ;; Currently this is implemented by calling out to the fine C++ blob. + (catch 'system-error + (lambda () + (let ((pipe (open-pipe* OPEN_WRITE %guix-register-program))) + (and pipe + (begin + (format pipe "~a~%~a~%~a~%" + path (or deriver "") (length references)) + (for-each (cut format pipe "~a~%" <>) references) + (zero? (close-pipe pipe)))))) + (lambda args + ;; Failed to run %GUIX-REGISTER-PROGRAM. + #f))) + ;;; ;;; Store paths. diff --git a/guix/ui.scm b/guix/ui.scm index f15419f7a8..d6058f806b 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; @@ -138,7 +138,7 @@ messages." "Display version information for COMMAND and `(exit 0)'." (simple-format #t "~a (~a) ~a~%" command %guix-package-name %guix-version) - (display (_ "Copyright (C) 2013 the Guix authors + (display (_ "Copyright (C) 2014 the Guix authors License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. @@ -404,7 +404,11 @@ WIDTH columns." (format port "location: ~a~%" (or (and=> (package-location p) location->string) (_ "unknown"))) - (format port "home-page: ~a~%" (package-home-page p)) + + ;; Note: Starting from version 1.6 or recutils, hyphens are not allowed in + ;; field identifiers. + (format port "homepage: ~a~%" (package-home-page p)) + (format port "license: ~a~%" (match (package-license p) (((? license? licenses) ...) @@ -554,13 +558,17 @@ reporting." (command-files))) (define (show-guix-help) + (define (internal? command) + (member command '("substitute-binary" "authenticate" "offload"))) + (format #t (_ "Usage: guix COMMAND ARGS... Run COMMAND with ARGS.\n")) (newline) (format #t (_ "COMMAND must be one of the sub-commands listed below:\n")) (newline) ;; TODO: Display a synopsis of each command. - (format #t "~{ ~a~%~}" (sort (commands) string<?)) + (format #t "~{ ~a~%~}" (sort (remove internal? (commands)) + string<?)) (show-bug-report-information)) (define program-name diff --git a/guix/utils.scm b/guix/utils.scm index 04a74ee29a..5fda2116de 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. @@ -34,7 +34,7 @@ #:use-module (ice-9 regex) #:use-module (ice-9 match) #:use-module (ice-9 format) - #:autoload (system foreign) (pointer->procedure) + #:use-module (system foreign) #:export (bytevector->base16-string base16-string->bytevector @@ -43,6 +43,7 @@ nixpkgs-derivation* compile-time-value + fcntl-flock memoize default-keyword-arguments substitute-keyword-arguments @@ -224,6 +225,67 @@ buffered data is lost." ;;; +;;; Advisory file locking. +;;; + +(define %struct-flock + ;; 'struct flock' from <fcntl.h>. + (list short ; l_type + short ; l_whence + size_t ; l_start + size_t ; l_len + int)) ; l_pid + +(define F_SETLKW + ;; On Linux-based systems, this is usually 7, but not always + ;; (exceptions include SPARC.) On GNU/Hurd, it's 9. + (compile-time-value + (cond ((string-contains %host-type "sparc") 9) ; sparc-*-linux-gnu + ((string-contains %host-type "linux") 7) ; *-linux-gnu + (else 9)))) ; *-gnu* + +(define F_xxLCK + ;; The F_RDLCK, F_WRLCK, and F_UNLCK constants. + (compile-time-value + (cond ((string-contains %host-type "sparc") #(1 2 3)) ; sparc-*-linux-gnu + ((string-contains %host-type "hppa") #(1 2 3)) ; hppa-*-linux-gnu + ((string-contains %host-type "linux") #(0 1 2)) ; *-linux-gnu + (else #(1 2 3))))) ; *-gnu* + +(define fcntl-flock + (let* ((ptr (dynamic-func "fcntl" (dynamic-link))) + (proc (pointer->procedure int ptr `(,int ,int *)))) + (lambda (fd-or-port operation) + "Perform locking OPERATION on the file beneath FD-OR-PORT. OPERATION +must be a symbol, one of 'read-lock, 'write-lock, or 'unlock." + (define (operation->int op) + (case op + ((read-lock) (vector-ref F_xxLCK 0)) + ((write-lock) (vector-ref F_xxLCK 1)) + ((unlock) (vector-ref F_xxLCK 2)) + (else (error "invalid fcntl-flock operation" op)))) + + (define fd + (if (port? fd-or-port) + (fileno fd-or-port) + fd-or-port)) + + ;; XXX: 'fcntl' is a vararg function, but here we happily use the + ;; standard ABI; crossing fingers. + (let ((err (proc fd + F_SETLKW ; lock & wait + (make-c-struct %struct-flock + (list (operation->int operation) + SEEK_SET + 0 0 ; whole file + 0))))) + (or (zero? err) + + ;; Presumably we got EAGAIN or so. + (throw 'flock-error fd)))))) + + +;;; ;;; Miscellaneous. ;;; diff --git a/m4/guix.m4 b/m4/guix.m4 index a98378db79..19e041a72c 100644 --- a/m4/guix.m4 +++ b/m4/guix.m4 @@ -1,5 +1,5 @@ dnl GNU Guix --- Functional package management for GNU -dnl Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +dnl Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> dnl dnl This file is part of GNU Guix. dnl @@ -134,3 +134,20 @@ AC_DEFUN([GUIX_CHECK_SRFI_37], [ ac_cv_guix_srfi_37_broken=yes fi]) ]) + +dnl GUIX_CHECK_UNBUFFERED_CBIP +dnl +dnl Check whether 'setbvuf' works on custom binary input ports (CBIPs), as is +dnl the case starting with Guile 2.0.10. +AC_DEFUN([GUIX_CHECK_UNBUFFERED_CBIP], [ + AC_CACHE_CHECK([whether Guile's custom binary input ports support 'setvbuf'], + [ac_cv_guix_cbips_support_setvbuf], + [if "$GUILE" -c "(use-modules (rnrs io ports)) \ + (let ((p (make-custom-binary-input-port \"cbip\" pk #f #f #f))) \ + (setvbuf p _IONBF))" >&5 2>&1 + then + ac_cv_guix_cbips_support_setvbuf=yes + else + ac_cv_guix_cbips_support_setvbuf=no + fi]) +]) diff --git a/nix-upstream b/nix-upstream -Subproject 1b6ee8f4c7e74f75e1f49b43cf22be7730b3064 +Subproject bf0ad8aabca67b4faabe3a1ac3c57884ae9924f diff --git a/nix/guix-register/guix-register.cc b/nix/guix-register/guix-register.cc index 14478f6a13..324673f346 100644 --- a/nix/guix-register/guix-register.cc +++ b/nix/guix-register/guix-register.cc @@ -1,5 +1,5 @@ /* GNU Guix --- Functional package management for GNU - Copyright (C) 2013 Ludovic Courtès <ludo@gnu.org> + Copyright (C) 2013, 2014 Ludovic Courtès <ludo@gnu.org> Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Eelco Dolstra <eelco.dolstra@logicblox.com> @@ -133,10 +133,13 @@ register_validity (LocalStore *store, std::istream &input, if (info.path == "") break; - /* Rewrite the input to refer final name, as if we were in a chroot - under PREFIX. */ - std::string final_prefix (NIX_STORE_DIR "/"); - info.path = final_prefix + baseNameOf (info.path); + if (!prefix.empty ()) + { + /* Rewrite the input to refer to the final name, as if we were in a + chroot under PREFIX. */ + std::string final_prefix (NIX_STORE_DIR "/"); + info.path = final_prefix + baseNameOf (info.path); + } /* Keep its real path to canonicalize it and compute its hash. */ std::string real_path; @@ -165,6 +168,9 @@ register_validity (LocalStore *store, std::istream &input, int main (int argc, char *argv[]) { + /* Honor the environment variables, and initialize the settings. */ + settings.processEnvironment (); + try { argp_parse (&argp, argc, argv, 0, 0, 0); @@ -173,10 +179,11 @@ main (int argc, char *argv[]) 'settings.nixStore', 'settings.nixDBPath', etc. */ LocalStore store; - /* Under the --prefix tree, the final name of the store will be - NIX_STORE_DIR. Set it here so that the database uses file names - prefixed by NIX_STORE_DIR and not PREFIX + NIX_STORE_DIR. */ - settings.nixStore = NIX_STORE_DIR; + if (!prefix.empty ()) + /* Under the --prefix tree, the final name of the store will be + NIX_STORE_DIR. Set it here so that the database uses file names + prefixed by NIX_STORE_DIR and not PREFIX + NIX_STORE_DIR. */ + settings.nixStore = NIX_STORE_DIR; register_validity (&store, *input); } diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc index cf87e39354..d35b1cd076 100644 --- a/nix/nix-daemon/guix-daemon.cc +++ b/nix/nix-daemon/guix-daemon.cc @@ -1,5 +1,5 @@ /* GNU Guix --- Functional package management for GNU - Copyright (C) 2012, 2013 Ludovic Courtès <ludo@gnu.org> + Copyright (C) 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> This file is part of GNU Guix. @@ -67,6 +67,7 @@ builds derivations on behalf of its clients."; #define GUIX_OPT_CHROOT_DIR 10 #define GUIX_OPT_LISTEN 11 #define GUIX_OPT_NO_SUBSTITUTES 12 +#define GUIX_OPT_NO_BUILD_HOOK 13 static const struct argp_option options[] = { @@ -94,6 +95,8 @@ static const struct argp_option options[] = "Perform builds as a user of GROUP" }, { "no-substitutes", GUIX_OPT_NO_SUBSTITUTES, 0, 0, "Do not use substitutes" }, + { "no-build-hook", GUIX_OPT_NO_BUILD_HOOK, 0, 0, + "Do not use the 'build hook'" }, { "cache-failures", GUIX_OPT_CACHE_FAILURES, 0, 0, "Cache build failures" }, { "lose-logs", GUIX_OPT_LOSE_LOGS, 0, 0, @@ -159,6 +162,9 @@ parse_opt (int key, char *arg, struct argp_state *state) case GUIX_OPT_NO_SUBSTITUTES: settings.useSubstitutes = false; break; + case GUIX_OPT_NO_BUILD_HOOK: + settings.useBuildHook = false; + break; case GUIX_OPT_DEBUG: verbosity = lvlDebug; break; @@ -226,6 +232,21 @@ main (int argc, char *argv[]) settings.substituters.clear (); settings.useSubstitutes = true; +#ifdef HAVE_DAEMON_OFFLOAD_HOOK + /* Use our build hook for distributed builds by default. */ + settings.useBuildHook = true; + if (getenv ("NIX_BUILD_HOOK") == NULL) + { + std::string build_hook; + + build_hook = settings.nixLibexecDir + "/guix/offload"; + setenv ("NIX_BUILD_HOOK", build_hook.c_str (), 1); + } +#else + /* We are not installing any build hook, so disable it. */ + settings.useBuildHook = false; +#endif + argp_parse (&argp, argc, argv, 0, 0, 0); if (settings.useSubstitutes) diff --git a/nix/scripts/offload.in b/nix/scripts/offload.in new file mode 100644 index 0000000000..50faed31c0 --- /dev/null +++ b/nix/scripts/offload.in @@ -0,0 +1,11 @@ +#!@SHELL@ +# A shorthand for "guix offload", for use by the daemon. + +if test "x$GUIX_UNINSTALLED" = "x" +then + prefix="@prefix@" + exec_prefix="@exec_prefix@" + exec "@bindir@/guix" offload "$@" +else + exec guix offload "$@" +fi diff --git a/po/Makevars b/po/Makevars index 81fd53ef2c..ade615a452 100644 --- a/po/Makevars +++ b/po/Makevars @@ -5,11 +5,14 @@ DOMAIN = $(PACKAGE) subdir = po top_builddir = .. -# These options get passed to xgettext. -XGETTEXT_OPTIONS = \ - --language=Scheme --from-code=UTF-8 \ - --keyword=_ --keyword=N_ \ - --keyword=synopsis --keyword=description +# These options get passed to xgettext. We want to catch standard +# gettext uses, package synopses and descriptions, and SRFI-34 error +# condition messages. +XGETTEXT_OPTIONS = \ + --language=Scheme --from-code=UTF-8 \ + --keyword=_ --keyword=N_ \ + --keyword=synopsis --keyword=description \ + --keyword=message COPYRIGHT_HOLDER = Ludovic Courtès diff --git a/po/POTFILES.in b/po/POTFILES.in index beefdc901b..b329f21e92 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -15,3 +15,4 @@ guix/scripts/authenticate.scm guix/gnu-maintenance.scm guix/ui.scm guix/http-client.scm +guix/nar.scm diff --git a/po/sr.po b/po/sr.po index ea2abdf12f..4cd3a31be3 100644 --- a/po/sr.po +++ b/po/sr.po @@ -1,21 +1,20 @@ # Serbian translation of guix. # Copyright (C) 2013 Free Software Foundation, Inc. # This file is distributed under the same license as the guix package. -# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2013. +# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2013, 2014. msgid "" msgstr "" -"Project-Id-Version: guix 0.4-pre2\n" +"Project-Id-Version: guix 0.5-pre2\n" "Report-Msgid-Bugs-To: ludo@gnu.org\n" -"POT-Creation-Date: 2013-12-10 22:16+0100\n" -"PO-Revision-Date: 2013-11-08 11:41+0200\n" +"POT-Creation-Date: 2013-12-03 21:18+0100\n" +"PO-Revision-Date: 2014-01-13 22:32+0200\n" "Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n" "Language-Team: Serbian <(nothing)>\n" "Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: gnu/packages.scm:94 #, scheme-format @@ -29,10 +28,12 @@ msgstr "Поздрав, Гну народе: Пример Гну пакета" #: gnu/packages/base.scm:62 msgid "" "GNU Hello prints the message \"Hello, world!\" and then exits. It\n" -"serves as an example of standard GNU coding practices. As such, it " -"supports\n" +"serves as an example of standard GNU coding practices. As such, it supports\n" "command-line arguments, multiple languages, and so on." msgstr "" +"Гнуов Поздравник исписује поруку „Поздрав, народе!“ и излази. Служи\n" +"као пример стандардног увежбавања Гнуовог кодирања. Као такав, подржава\n" +"аргументе линије наредби, вишеструке језике, и тако редом." #: gnu/packages/base.scm:80 msgid "Print lines matching a pattern" @@ -48,6 +49,13 @@ msgid "" "numbers. GNU grep offers many extensions over the standard utility,\n" "including, for example, recursive directory searching." msgstr "" +"греп је алат за проналажење текста унутар датотека. Текст се проналази\n" +"упоређивањем са обрасцем који достави корисник у једној или више датотека.\n" +"Образац може бити достављен као основни или проширени регуларни израз, или\n" +"као стална ниска. По основи, одговарајући текст се једноставно исписује\n" +"на екрану, међутим излаз може бити прилагођен да садржи, рецимо бројеве\n" +"редова. Гнуов греп нуди многа проширења преко уобичајеног помагала,\n" +"укључујући, на пример, дубинско претраживање директоријума." #: gnu/packages/base.scm:104 msgid "Stream editor" @@ -56,13 +64,16 @@ msgstr "Уређивач протока" #: gnu/packages/base.scm:119 msgid "" "Sed is a non-interactive, text stream editor. It receives a text\n" -"input from a file or from standard input and it then applies a series of " -"text\n" -"editing commands to the stream and prints its output to standard output. " -"It\n" +"input from a file or from standard input and it then applies a series of text\n" +"editing commands to the stream and prints its output to standard output. It\n" "is often used for substituting text patterns in a stream. The GNU\n" "implementation offers several extensions over the standard utility." msgstr "" +"Сед је не-међудејствени, уређивач тока текста. Он прихвата текстуални\n" +"улаз из датотеке или са стандардног улаза и затим примењује низ наредби\n" +"за уређивање текста над токим и исписује његов излаз на стандардни излаз.\n" +"Често се користи за замену текстуалних образаца у току. Гнуова примена\n" +"нуди неколико проширења поред уобичајеног помагала." #: gnu/packages/base.scm:139 msgid "Managing tar archives" @@ -77,6 +88,12 @@ msgid "" "creation/modification dates. GNU tar offers many extensions over the\n" "standard utility." msgstr "" +"Тар обезбеђује способност за стварање тар архива, као и способност\n" +"за извлачење, освежавање или исписивање датотека у постојећој архиви.\n" +"Користан је за обједињавање више датотека у једну већу датотеку, док\n" +"задржава структуру директоријума и податке о датотеци као што су\n" +"овлашћења и датуми стварања/измена. Гнуов тар нуди многа проширења\n" +"поред стандардног помагала." #: gnu/packages/base.scm:168 msgid "Apply differences to originals, with optional backups" @@ -85,12 +102,15 @@ msgstr "Примењивање разлика на оригинале, са оп #: gnu/packages/base.scm:170 msgid "" "Patch is a program that applies changes to files based on differences\n" -"laid out as by the program \"diff\". The changes may be applied to one or " -"more\n" +"laid out as by the program \"diff\". The changes may be applied to one or more\n" "files depending on the contents of the diff file. It accepts several\n" "different diff formats. It may also be used to revert previously applied\n" "differences." msgstr "" +"Закрпко је програм који примењује измене над датотекама на основу разлика\n" +"изнесених програмом различник. Измене могу бити примењене над једном или\n" +"више датотека у зависности од садржаја датотеке разлика. Прихвата више\n" +"различитих записа различника. Такође може бити коришћен за враћање претходно примењених разлика." #: gnu/packages/base.scm:190 msgid "Comparing and merging files" @@ -99,13 +119,16 @@ msgstr "Упоређивање и стапање датотека" #: gnu/packages/base.scm:192 msgid "" "GNU Diffutils is a package containing tools for finding the\n" -"differences between files. The \"diff\" command is used to show how two " -"files\n" -"differ, while \"cmp\" shows the offsets and line numbers where they " -"differ. \n" +"differences between files. The \"diff\" command is used to show how two files\n" +"differ, while \"cmp\" shows the offsets and line numbers where they differ. \n" "\"diff3\" allows you to compare three files. Finally, \"sdiff\" offers an\n" "interactive means to merge two files." msgstr "" +"Гнуова помагала разлика је пакет који садржи алате за проналажење разлика\n" +"између датотека. Наредба „diff“ се користи за приказивање разлика двеју\n" +"датотека, док „cmp“ приказује помераје и бројеве редова на којима се\n" +"разликују. „diff3“ вам омогућава упоређивање три датотеке. На крају,\n" +"„sdiff“ нуди међудејствени начин за стапање две датотеке." #: gnu/packages/base.scm:219 msgid "Operating on files matching given criteria" @@ -115,14 +138,17 @@ msgstr "Радње над датотекама према датим услов msgid "" "Findutils supplies the basic file directory searching utilities of the\n" "GNU system. It consists of two primary searching utilities: \"find\"\n" -"recursively searches for files in a directory according to given criteria " -"and\n" -"\"locate\" lists files in a database that match a query. Two auxiliary " -"tools\n" -"are included: \"updatedb\" updates the file name database and \"xargs\" may " -"be\n" +"recursively searches for files in a directory according to given criteria and\n" +"\"locate\" lists files in a database that match a query. Two auxiliary tools\n" +"are included: \"updatedb\" updates the file name database and \"xargs\" may be\n" "used to apply commands with arbitrarily long arguments." msgstr "" +"Помагала проналажења достављају основна помагала за претраживање датотеке\n" +"Гнуовог система. Састоји се од два основна помагала претраживања: „find“\n" +"дубински тражи датотеке у директоријуму према задатом мерилу а „locate“\n" +"исписује датотеке у бази података које одговарају упиту. Укључена су два\n" +"помоћна алата: „updatedb“ освежава назив датотеке базе података а „xargs“\n" +"се може користити за примењивање наредби са произвољно дугим аргументима." #: gnu/packages/base.scm:265 msgid "Core GNU utilities (file, text, shell)" @@ -132,10 +158,13 @@ msgstr "Гнуова кључна помагала (датотека, текст msgid "" "GNU Coreutils includes all of the basic command-line tools that are\n" "expected in a POSIX system. These provide the basic file, shell and text\n" -"manipulation functions of the GNU system. Most of these tools offer " -"extended\n" +"manipulation functions of the GNU system. Most of these tools offer extended\n" "functionality beyond that which is outlined in the POSIX standard." msgstr "" +"Гнуова кључна помагала укључују све основне алате линије наредби који се\n" +"очекују у ПОСИКС систему. Обезбеђују основне функције управљања датотеком,\n" +"шкољком и текстом на Гнуовом систему. Већина ових алата нуди проширене\n" +"функционалности изван оних које су наведене у ПОСИКС стандарду." #: gnu/packages/base.scm:300 msgid "Remake files automatically" @@ -145,12 +174,17 @@ msgstr "Самостално поновно стварање датотека" msgid "" "Make is a program that is used to control the production of\n" "executables or other files from their source files. The process is\n" -"controlled from a Makefile, in which the developer specifies how each file " -"is\n" +"controlled from a Makefile, in which the developer specifies how each file is\n" "generated from its source. It has powerful dependency resolution and the\n" "ability to determine when files have to be regenerated after their sources\n" "change. GNU make offers many powerful extensions over the standard utility." msgstr "" +"Мејк је програм који се користи за управљање стварањем извршних или других\n" +"датотека из њихових изворних. Поступком се управља из „Makefile“-а, у коме\n" +"програмери наводе како се свака датотека ствара из свог извора. Поседује\n" +"моћно решавање зависности и способност одређивања када датотеке треба да\n" +"буду поново створене након измена њихових извора. Гнуов мејк нуди много\n" +"моћних проширења поред стандардног помагала." #: gnu/packages/base.scm:345 msgid "Binary utilities: bfd gas gprof ld" @@ -159,13 +193,16 @@ msgstr "Бинарна помагала: bfd gas gprof ld" #: gnu/packages/base.scm:347 msgid "" "GNU Binutils is a collection of tools for working with binary files.\n" -"Perhaps the most notable are \"ld\", a linker, and \"as\", an assembler. " -"Other\n" +"Perhaps the most notable are \"ld\", a linker, and \"as\", an assembler. Other\n" "tools include programs to display binary profiling information, list the\n" -"strings in a binary file, and utilities for working with archives. The \"bfd" -"\"\n" +"strings in a binary file, and utilities for working with archives. The \"bfd\"\n" "library for working with executable and object formats is also included." msgstr "" +"Гнуова бинарна помагала јесте збирка алата за рад са извршним датотекама.\n" +"Можда је најпознатији „ld“, повезивач, и „as“, саставник. Остали алати\n" +"садрже програме за приказивање података бинарног профилисања, исписивање\n" +"ниски у извршној датотеци, и помагала за рад са архивама. Ту је такође и \n" +"библиотека „bfd“ за рад са извршним и записима објеката." #: gnu/packages/base.scm:476 msgid "The GNU C Library" @@ -174,16 +211,13 @@ msgstr "Гну Ц библиотека" #: gnu/packages/base.scm:478 msgid "" "Any Unix-like operating system needs a C library: the library which\n" -"defines the \"system calls\" and other basic facilities such as open, " -"malloc,\n" +"defines the \"system calls\" and other basic facilities such as open, malloc,\n" "printf, exit...\n" "\n" -"The GNU C library is used as the C library in the GNU system and most " -"systems\n" +"The GNU C library is used as the C library in the GNU system and most systems\n" "with the Linux kernel." msgstr "" -"Сваком Јуниксоликом оперативном систему је потребна Ц библиотека: " -"библиотека\n" +"Сваком Јуниксоликом оперативном систему је потребна Ц библиотека: библиотека\n" "која одређује „системске позиве“ и остале основне олакшице као што су\n" "„open, malloc, printf, exit...“\n" "\n" @@ -199,8 +233,7 @@ msgid "" "The Time Zone Database (often called tz or zoneinfo)\n" "contains code and data that represent the history of local time for many\n" "representative locations around the globe. It is updated periodically to\n" -"reflect changes made by political bodies to time zone boundaries, UTC " -"offsets,\n" +"reflect changes made by political bodies to time zone boundaries, UTC offsets,\n" "and daylight-saving rules." msgstr "" "База података временске зоне (често називана „tz“ или „zoneinfo“)\n" @@ -211,7 +244,7 @@ msgstr "" #: gnu/packages/base.scm:925 msgid "GNU C++ standard library (intermediate)" -msgstr "" +msgstr "Гнуова Ц++ стандардна библиотека (посредничка)" #: gnu/packages/base.scm:1012 msgid "The linker wrapper" @@ -220,39 +253,40 @@ msgstr "Омотач повезивача" #: gnu/packages/base.scm:1014 msgid "" "The linker wrapper (or `ld-wrapper') wraps the linker to add any\n" -"missing `-rpath' flags, and to detect any misuse of libraries outside of " -"the\n" +"missing `-rpath' flags, and to detect any misuse of libraries outside of the\n" "store." msgstr "" "Омотач повезивача (или „ld-wrapper“) обмотава повезивача да би додао\n" "недостајућу опцију „-rpath“, и да би открио лоше коришћење библиотека\n" "изван складишта." -#: gnu/packages/guile.scm:96 gnu/packages/guile.scm:167 +#: gnu/packages/guile.scm:97 gnu/packages/guile.scm:168 msgid "Scheme implementation intended especially for extensions" msgstr "Примена шеме нарочито осмишљена за проширења" -#: gnu/packages/guile.scm:98 gnu/packages/guile.scm:169 +#: gnu/packages/guile.scm:99 gnu/packages/guile.scm:170 msgid "" "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the\n" "official extension language of the GNU system. It is an implementation of\n" "the Scheme language which can be easily embedded in other applications to\n" -"provide a convenient means of extending the functionality of the " -"application\n" +"provide a convenient means of extending the functionality of the application\n" "without requiring the source code to be rewritten." msgstr "" +"Гуиле је Гнуов свеприсутан паметан језик за проширења, званични језик\n" +"проширења за Гнуов систем. То је примена Шеме језика који може лако\n" +"бити уграђен у друге програме како би обезбедио исплатив начин проширивања\n" +"функционалности програма без потребе поновног писања изворног кода." -#: gnu/packages/guile.scm:212 +#: gnu/packages/guile.scm:213 msgid "Framework for building readers for GNU Guile" msgstr "Радни склоп за изградњу читача за Гну Гуила" -#: gnu/packages/guile.scm:214 +#: gnu/packages/guile.scm:215 msgid "" "Guile-Reader is a simple framework for building readers for GNU Guile.\n" "\n" "The idea is to make it easy to build procedures that extend Guile’s read\n" -"procedure. Readers supporting various syntax variants can easily be " -"written,\n" +"procedure. Readers supporting various syntax variants can easily be written,\n" "possibly by re-using existing “token readers” of a standard Scheme\n" "readers. For example, it is used to implement Skribilo’s R5RS-derived\n" "document syntax.\n" @@ -266,41 +300,45 @@ msgstr "" "Замисао је олакшати изградњу поступака који проширују Гуилов поступак\n" "читања. Читачи који подржавају разне варијанте синтаксе могу бити лако\n" "написани, по могућству поновним коришћењем постојећих „читача “ читача\n" -"стандардне Шеме. На пример, користи се за примену синтаксе документа која " -"произилази из Р5РС Скрибилоа.\n" +"стандардне Шеме. На пример, користи се за примену синтаксе документа која произилази из Р5РС Скрибилоа.\n" "\n" "Приступ Гуиле-читача је сличан Општем Лисповом „читању табеле“, али је на\n" "срећу много моћнији и прилагодљивији (на пример, неко може да покрене\n" "онолико читача колико му је потребно)." -#: gnu/packages/guile.scm:266 +#: gnu/packages/guile.scm:267 msgid "Guile bindings to ncurses" msgstr "Гуилеово повезивање са ен-курсом" -#: gnu/packages/guile.scm:268 +#: gnu/packages/guile.scm:269 msgid "" "guile-ncurses provides Guile language bindings for the ncurses\n" "library." msgstr "" +"гуиле-нкурсис обезбеђује повезивање Гуиле језика за нкурсис\n" +"библиотеку." -#: gnu/packages/guile.scm:288 +#: gnu/packages/guile.scm:289 msgid "Run jobs at scheduled times" msgstr "Покретање послова у заказано време" -#: gnu/packages/guile.scm:290 +#: gnu/packages/guile.scm:291 msgid "" "GNU Mcron is a complete replacement for Vixie cron. It is used to run\n" -"tasks on a schedule, such as every hour or every Monday. Mcron is written " -"in\n" +"tasks on a schedule, such as every hour or every Monday. Mcron is written in\n" "Guile, so its configuration can be written in Scheme; the original cron\n" "format is also supported." msgstr "" +"Гнуов Мкрон је потпуна замена за Викси крон. Користи се за покретање\n" +"задатака на заказивање, рецимо сваког сата или сваког понедељка. Мкрон\n" +"је написан у Гуилеу, тако да његово подешавање може бити написано у Шеми;\n" +"изворни кронов запис је такође подржан." -#: gnu/packages/guile.scm:318 +#: gnu/packages/guile.scm:319 msgid "Collection of useful Guile Scheme modules" msgstr "Збирка корисних модула Гуиле Шеме" -#: gnu/packages/guile.scm:320 +#: gnu/packages/guile.scm:321 msgid "" "guile-lib is intended as an accumulation place for pure-scheme Guile\n" "modules, allowing for people to cooperate integrating their generic Guile\n" @@ -312,25 +350,35 @@ msgstr "" "у обједињену библиотеку. Сетите се само „down-scaled, limited-scope CPAN\n" "for Guile“." +#: gnu/packages/guile.scm:380 +msgid "Guile bindings to libssh" +msgstr "Гуилеово повезивање са библбш-ом" + +#: gnu/packages/guile.scm:382 +msgid "" +"Guile-SSH is a library that provides access to the SSH protocol for\n" +"programs written in GNU Guile interpreter. It is a wrapper to the underlying\n" +"libssh library." +msgstr "" +"Гуиле-БШ је библиотека која обезбеђује приступ протоколу безбедне шкољке\n" +"за програме написане у Гнуовом Гуиле преводиоцу. То је омотач основне\n" +"библиотеке либссх." + #: gnu/packages/lout.scm:109 msgid "Lout, a document layout system similar in style to LaTeX" msgstr "Лоут, систем изгледа документа сличан у стилу ЛаТеХ-у" #: gnu/packages/lout.scm:111 msgid "" -"The Lout document formatting system is now reads a high-level description " -"of\n" -"a document similar in style to LaTeX and produces a PostScript or plain " -"text\n" +"The Lout document formatting system is now reads a high-level description of\n" +"a document similar in style to LaTeX and produces a PostScript or plain text\n" "output file.\n" "\n" "Lout offers an unprecedented range of advanced features, including optimal\n" "paragraph and page breaking, automatic hyphenation, PostScript EPS file\n" -"inclusion and generation, equation formatting, tables, diagrams, rotation " -"and\n" +"inclusion and generation, equation formatting, tables, diagrams, rotation and\n" "scaling, sorted indexes, bibliographic databases, running headers and\n" -"odd-even pages, automatic cross referencing, multilingual documents " -"including\n" +"odd-even pages, automatic cross referencing, multilingual documents including\n" "hyphenation (most European languages are supported), formatting of computer\n" "programs, and much more, all ready to use. Furthermore, Lout is easily\n" "extended with definitions which are very much easier to write than troff of\n" @@ -361,13 +409,16 @@ msgstr "Управљајте датотекама обичног текста к #: gnu/packages/recutils.scm:54 msgid "" "GNU Recutils is a set of tools and libraries for creating and\n" -"manipulating text-based, human-editable databases. Despite being text-" -"based,\n" +"manipulating text-based, human-editable databases. Despite being text-based,\n" "databases created with Recutils carry all of the expected features such as\n" -"unique fields, primary keys, time stamps and more. Many different field " -"types\n" +"unique fields, primary keys, time stamps and more. Many different field types\n" "are supported, as is encryption." msgstr "" +"Гнуово Рекпомагало је скуп алата и библиотека за стварање и руковање\n" +"базама података заснованим на тексту које се могу уређивати. Иако су\n" +"засноване на тексту, базе података створене Рекпомагалом садрже све\n" +"очекиване функције као што су јединствена поља, основни кључеви, ознаке\n" +"времена и још неке. Многе различите врсте поља су подржане, као у шифровању." #: guix/scripts/build.scm:54 #, scheme-format @@ -383,13 +434,12 @@ msgstr "" "Изграђује дати ПАКЕТ-ИЛИ-ИЗВЕДНИЦУ и исписује њихове путање излаза.\n" #: guix/scripts/build.scm:75 -#, fuzzy msgid "" "\n" " -e, --expression=EXPR build the package or derivation EXPR evaluates to" msgstr "" "\n" -" -e, --expression=ИЗРАЗ изграђује процене ИЗРАЗА пакета на" +" -e, --expression=ИЗРАЗ изграђује процене ИЗРАЗА пакета или изведенице на" #: guix/scripts/build.scm:77 msgid "" @@ -453,8 +503,7 @@ msgid "" " --no-substitutes build instead of resorting to pre-built substitutes" msgstr "" "\n" -" --no-substitutes изграђује уместо да поново ређа заменике " -"предизградње" +" --no-substitutes изграђује уместо да поново ређа заменике предизградње" #: guix/scripts/build.scm:93 guix/scripts/package.scm:492 msgid "" @@ -472,8 +521,7 @@ msgid "" " -c, --cores=N allow the use of up to N CPU cores for the build" msgstr "" "\n" -" -c, --cores=N омогућава коришћење до N језгра процесора за " -"изградњу" +" -c, --cores=N омогућава коришћење до N језгра процесора за изградњу" #: guix/scripts/build.scm:98 msgid "" @@ -482,8 +530,7 @@ msgid "" " as a garbage collector root" msgstr "" "\n" -" -r, --root=ДАТОТЕКА чини ДАТОТЕКУ симболичком везом ка резултату, и " -"бележи је\n" +" -r, --root=ДАТОТЕКА чини ДАТОТЕКУ симболичком везом ка резултату, и бележи је\n" " као корен скупљача ђубра" #: guix/scripts/build.scm:101 @@ -499,6 +546,8 @@ msgid "" "\n" " --log-file return the log file names for the given derivations" msgstr "" +"\n" +" --log-file исписује називе датотеке дневника за дате изведенице" #: guix/scripts/build.scm:106 guix/scripts/download.scm:53 #: guix/scripts/package.scm:509 guix/scripts/gc.scm:58 @@ -562,7 +611,7 @@ msgstr "~A: непознат пакет~%" #: guix/scripts/build.scm:303 #, scheme-format msgid "no build log for '~a'~%" -msgstr "" +msgstr "нема дневника изградње за „~a“~%" #: guix/scripts/download.scm:44 msgid "" @@ -625,14 +674,14 @@ msgid "nothing to do: already at the empty profile~%" msgstr "ништа за урадити: већ сам у празном профилу~%" #: guix/scripts/package.scm:183 -#, fuzzy, scheme-format +#, scheme-format msgid "The following package would be removed:~%~{~a~%~}~%" -msgstr "Следећи пакети би требали бити уклоњени:~% ~{~a~%~}~%" +msgstr "Следећи пакети би требали бити уклоњени:~%~{~a~%~}~%" #: guix/scripts/package.scm:188 -#, fuzzy, scheme-format +#, scheme-format msgid "The following package will be removed:~%~{~a~%~}~%" -msgstr "Следећи пакети ће бити уклоњени:~% ~{~a~%~}~%" +msgstr "Следећи пакети ће бити уклоњени:~%~{~a~%~}~%" #: guix/scripts/package.scm:200 #, scheme-format @@ -709,8 +758,7 @@ msgid "" " -u, --upgrade[=REGEXP] upgrade all the installed packages matching REGEXP" msgstr "" "\n" -" -u, --upgrade[=РЕГИЗР] дограђује све инсталиране пакете који одговарају " -"РЕГИЗРАЗУ" +" -u, --upgrade[=РЕГИЗР] дограђује све инсталиране пакете који одговарају РЕГИЗРАЗУ" #: guix/scripts/package.scm:473 msgid "" @@ -739,15 +787,14 @@ msgstr "" " исписује генерације које одговарају ШАБЛОНУ" #: guix/scripts/package.scm:480 -#, fuzzy msgid "" "\n" " -d, --delete-generations[=PATTERN]\n" " delete generations matching PATTERN" msgstr "" "\n" -" -l, --list-generations[=ШАБЛОН]\n" -" исписује генерације које одговарају ШАБЛОНУ" +" -d, --delete-generations[=ШАБЛОН]\n" +" брише генерације које одговарају ШАБЛОНУ" #: guix/scripts/package.scm:484 msgid "" @@ -763,8 +810,7 @@ msgid "" " -n, --dry-run show what would be done without actually doing it" msgstr "" "\n" -" -n, --dry-run показује шта би требало да се уради а да заправо " -"ништа не ради" +" -n, --dry-run показује шта би требало да се уради а да заправо ништа не ради" #: guix/scripts/package.scm:495 msgid "" @@ -798,8 +844,7 @@ msgid "" msgstr "" "\n" " -I, --list-installed[=РЕГИЗР]\n" -" исписује инсталиране пакете који одговарају " -"РЕГИЗРАЗУ" +" исписује инсталиране пакете који одговарају РЕГИЗРАЗУ" #: guix/scripts/package.scm:505 msgid "" @@ -842,9 +887,9 @@ msgid "Please change the owner of `~a' to user ~s.~%" msgstr "Поставите као власника ~s над „~a“.~%" #: guix/scripts/package.scm:796 -#, fuzzy, scheme-format +#, scheme-format msgid "deleting ~a~%" -msgstr "Генерација ~a\t~a~%" +msgstr "бришем ~a~%" #: guix/scripts/package.scm:849 guix/scripts/package.scm:951 #, scheme-format @@ -862,14 +907,14 @@ msgid "~a package in profile~%" msgstr "~a пакет у профилу~%" #: guix/scripts/package.scm:915 -#, fuzzy, scheme-format +#, scheme-format msgid "Generation ~a\t~a" -msgstr "Генерација ~a\t~a~%" +msgstr "Генерација ~a\t~a" #: guix/scripts/package.scm:922 #, scheme-format msgid "~a\t(current)~%" -msgstr "" +msgstr "~a\t(текуће)~%" #: guix/scripts/gc.scm:39 msgid "" @@ -994,6 +1039,8 @@ msgid "" "\n" " --url=URL download the Guix tarball from URL" msgstr "" +"\n" +" --url=АДРЕСА преузима тарбал Гуикса са АДРЕСЕ" #: guix/scripts/pull.scm:169 msgid "" @@ -1001,8 +1048,7 @@ msgid "" " --bootstrap use the bootstrap Guile to build the new Guix" msgstr "" "\n" -" --bootstrap користи Гуиле почетног учитавања да изгради нови " -"Гуикс" +" --bootstrap користи Гуиле почетног учитавања да изгради нови Гуикс" #: guix/scripts/pull.scm:207 #, scheme-format @@ -1045,8 +1091,7 @@ msgstr "Преузима, молим сачекајте...~%" #: guix/scripts/substitute-binary.scm:441 #, scheme-format msgid "(Please consider upgrading Guile to get proper progress report.)~%" -msgstr "" -"(Размотрите надоградњу Гуила да добијете извештај о његовом напредовању.)~%" +msgstr "(Размотрите надоградњу Гуила да добијете извештај о његовом напредовању.)~%" #: guix/scripts/substitute-binary.scm:458 #, scheme-format @@ -1068,8 +1113,7 @@ msgid "" " store file names passed on the standard input" msgstr "" "\n" -" --query извештава о доступности заменика за називе " -"датотека\n" +" --query извештава о доступности заменика за називе датотека\n" " складишта прослеђених на стандардном улазу" #: guix/scripts/substitute-binary.scm:472 @@ -1081,31 +1125,30 @@ msgid "" msgstr "" "\n" " --substitute ОДРЕДИШТЕ СКЛАДИШНЕ-ДАТОТЕКЕ\n" -" преузима СКЛАДИШНУ-ДАТОТЕКУ и смешта је као Нар " -"удатотеци\n" +" преузима СКЛАДИШНУ-ДАТОТЕКУ и смешта је као Нар удатотеци\n" " ОДРЕДИШТЕ" -#: guix/scripts/substitute-binary.scm:596 +#: guix/scripts/substitute-binary.scm:593 #, scheme-format msgid "~a: unrecognized options~%" msgstr "~a: непозната опција~%" -#: guix/gnu-maintenance.scm:357 +#: guix/gnu-maintenance.scm:346 #, scheme-format msgid "signature verification failed for `~a'~%" msgstr "није успела провера потписа за „~a“~%" -#: guix/gnu-maintenance.scm:359 +#: guix/gnu-maintenance.scm:348 #, scheme-format msgid "(could be because the public key is not in your keyring)~%" msgstr "(може бити зато што јавни кључ није у вашем привеску)~%" -#: guix/gnu-maintenance.scm:434 +#: guix/gnu-maintenance.scm:423 #, scheme-format msgid "~a: could not locate source file" msgstr "~a: не могу да пронађем изворну датотеку" -#: guix/gnu-maintenance.scm:439 +#: guix/gnu-maintenance.scm:428 #, scheme-format msgid "~a: ~a: no `version' field in source; skipping~%" msgstr "~a: ~a: нема поља „version“ у извору; прескачем~%" @@ -1118,11 +1161,14 @@ msgstr "нисам успео да инсталирам локалитет: ~a~% #: guix/ui.scm:141 msgid "" "Copyright (C) 2013 the Guix authors\n" -"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl." -"html>\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 "" +"Ауторска права (C) 2013 аутори Гуикса\n" +"Лиценца ОЈЛв3+: ГНУ ОЈЛ издање 3 или касније <http://gnu.org/licenses/gpl.html>\n" +"Ово је слободан софтвер: слободни сте да га мењате и расподељујете.\n" +"Не постоји НИКАКВА ГАРАНЦИЈА, у оквирима дозвољеним законом.\n" #: guix/ui.scm:149 #, scheme-format @@ -1186,7 +1232,7 @@ msgid "failed to evaluate expression `~a': ~s~%" msgstr "нисам успео да проценим израз „~a“: ~s~%" #: guix/ui.scm:218 -#, fuzzy, scheme-format +#, scheme-format msgid "expression ~s does not evaluate to a package~%" msgstr "израз „~s“ се не процењује на пакет~%" @@ -1283,20 +1329,15 @@ msgstr "пратим преусмеравање на „~a“...~%" #~ "match to a specified pattern. By default, grep prints the matching\n" #~ "lines." #~ msgstr "" -#~ "Наредба греп претражује једну или више улазних датоотека за редовима " -#~ "који\n" -#~ "садрже поклапање са наведеним шаблоном. По основи, греп исписује " -#~ "поклопљене\n" +#~ "Наредба греп претражује једну или више улазних датоотека за редовима који\n" +#~ "садрже поклапање са наведеним шаблоном. По основи, греп исписује поклопљене\n" #~ "редове." #~ msgid "" #~ "Sed (stream editor) isn't really a true text editor or text processor.\n" -#~ "Instead, it is used to filter text, i.e., it takes text input and " -#~ "performs\n" -#~ "some operation (or set of operations) on it and outputs the modified " -#~ "text.\n" -#~ "Sed is typically used for extracting part of a file using pattern " -#~ "matching or\n" +#~ "Instead, it is used to filter text, i.e., it takes text input and performs\n" +#~ "some operation (or set of operations) on it and outputs the modified text.\n" +#~ "Sed is typically used for extracting part of a file using pattern matching or\n" #~ "substituting multiple occurrences of a string within a file." #~ msgstr "" #~ "Сед (уређивач протока) није стварно прави уређивач или обрађивач текста.\n" @@ -1308,18 +1349,13 @@ msgstr "пратим преусмеравање на „~a“...~%" #~ msgid "" #~ "The Tar program provides the ability to create tar archives, as well as\n" #~ "various other kinds of manipulation. For example, you can use Tar on\n" -#~ "previously created archives to extract files, to store additional files, " -#~ "or\n" +#~ "previously created archives to extract files, to store additional files, or\n" #~ "to update or list files which were already stored.\n" #~ "\n" -#~ "Initially, tar archives were used to store files conveniently on " -#~ "magnetic\n" -#~ "tape. The name \"Tar\" comes from this use; it stands for tape " -#~ "archiver.\n" -#~ "Despite the utility's name, Tar can direct its output to available " -#~ "devices,\n" -#~ "files, or other programs (using pipes), it can even access remote devices " -#~ "or\n" +#~ "Initially, tar archives were used to store files conveniently on magnetic\n" +#~ "tape. The name \"Tar\" comes from this use; it stands for tape archiver.\n" +#~ "Despite the utility's name, Tar can direct its output to available devices,\n" +#~ "files, or other programs (using pipes), it can even access remote devices or\n" #~ "files (as archives)." #~ msgstr "" #~ "Програм Тар обезбеђује способност стварања тар архива, као и разне друге\n" @@ -1329,20 +1365,16 @@ msgstr "пратим преусмеравање на „~a“...~%" #~ "\n" #~ "На почетку, тар архиве су биле коришћене за пригодно чување датотека на\n" #~ "магнетским тракама. Назив „Тар“ је настао из такве употребе; и значи\n" -#~ "архивар трака. Без обзира на назив помагала, Тар може да успери свој " -#~ "излаз\n" -#~ "ка доступним уређајима, датотекама, или другим програмима (употребом " -#~ "спојки)\n" +#~ "архивар трака. Без обзира на назив помагала, Тар може да успери свој излаз\n" +#~ "ка доступним уређајима, датотекама, или другим програмима (употребом спојки)\n" #~ "чак може и да приступи удаљеним уређајима или датотекама (као архивама)." #~ msgid "" #~ "GNU Patch takes a patch file containing a difference listing produced by\n" -#~ "the diff program and applies those differences to one or more original " -#~ "files,\n" +#~ "the diff program and applies those differences to one or more original files,\n" #~ "producing patched versions." #~ msgstr "" -#~ "Гнуова закрпа узима датотеку закрпе која садржи списак разлика " -#~ "произведен\n" +#~ "Гнуова закрпа узима датотеку закрпе која садржи списак разлика произведен\n" #~ "програмом за разлике (diff) и примењује те разлике на једној или више\n" #~ "изворних датотека, стварајући прикрпљена издања." @@ -1350,35 +1382,24 @@ msgstr "пратим преусмеравање на „~a“...~%" #~ "GNU Diffutils is a package of several programs related to finding\n" #~ "differences between files.\n" #~ "\n" -#~ "Computer users often find occasion to ask how two files differ. Perhaps " -#~ "one\n" -#~ "file is a newer version of the other file. Or maybe the two files started " -#~ "out\n" +#~ "Computer users often find occasion to ask how two files differ. Perhaps one\n" +#~ "file is a newer version of the other file. Or maybe the two files started out\n" #~ "as identical copies but were changed by different people.\n" #~ "\n" -#~ "You can use the diff command to show differences between two files, or " -#~ "each\n" -#~ "corresponding file in two directories. diff outputs differences between " -#~ "files\n" +#~ "You can use the diff command to show differences between two files, or each\n" +#~ "corresponding file in two directories. diff outputs differences between files\n" #~ "line by line in any of several formats, selectable by command line\n" -#~ "options. This set of differences is often called a ‘diff’ or ‘patch’. " -#~ "For\n" +#~ "options. This set of differences is often called a ‘diff’ or ‘patch’. For\n" #~ "files that are identical, diff normally produces no output; for\n" -#~ "binary (non-text) files, diff normally reports only that they are " -#~ "different.\n" +#~ "binary (non-text) files, diff normally reports only that they are different.\n" #~ "\n" -#~ "You can use the cmp command to show the offsets and line numbers where " -#~ "two\n" -#~ "files differ. cmp can also show all the characters that differ between " -#~ "the\n" +#~ "You can use the cmp command to show the offsets and line numbers where two\n" +#~ "files differ. cmp can also show all the characters that differ between the\n" #~ "two files, side by side.\n" #~ "\n" -#~ "You can use the diff3 command to show differences among three files. When " -#~ "two\n" -#~ "people have made independent changes to a common original, diff3 can " -#~ "report\n" -#~ "the differences between the original and the two changed versions, and " -#~ "can\n" +#~ "You can use the diff3 command to show differences among three files. When two\n" +#~ "people have made independent changes to a common original, diff3 can report\n" +#~ "the differences between the original and the two changed versions, and can\n" #~ "produce a merged file that contains both persons' changes together with\n" #~ "warnings about conflicts.\n" #~ "\n" @@ -1388,43 +1409,32 @@ msgstr "пратим преусмеравање на „~a“...~%" #~ "разлика између датотека.\n" #~ "\n" #~ "Корисници рачунара често желе да знају у чему се разликују две датотеке.\n" -#~ "Можда је једна датотека новије издање оне друге. Или су можда обе " -#~ "датотеке\n" +#~ "Можда је једна датотека новије издање оне друге. Или су можда обе датотеке\n" #~ "започете као истоветни умношци али су их измениле другачије особе.\n" #~ "\n" -#~ "Можете да користите наредбу „diff“ да покажете разлике између две " -#~ "датотеке\n" -#~ "или сваку одговарајућу датотеку у два директоријума. дифф исписује " -#~ "разлике\n" +#~ "Можете да користите наредбу „diff“ да покажете разлике између две датотеке\n" +#~ "или сваку одговарајућу датотеку у два директоријума. дифф исписује разлике\n" #~ "између датотека ред по ред у било ком од неколико записа, бирањем опција\n" #~ "линије наредби. Овај скуп разлика се често назива „diff“ или „patch“. За\n" -#~ "датотеке које су исте, дифф обично не даје резултат; за извршне (не-" -#~ "текстуалне)\n" +#~ "датотеке које су исте, дифф обично не даје резултат; за извршне (не-текстуалне)\n" #~ "датотеке, дифф обично извештава само о томе да се оне разликују.\n" #~ "\n" #~ "\n" #~ "Можете да користите наредбу „cmp“ да прикажете помераје и бројеве редова\n" -#~ "где се две датотеке разликују. цмп може такође да покаже све знакове " -#~ "који\n" +#~ "где се две датотеке разликују. цмп може такође да покаже све знакове који\n" #~ "се разликују између две датотеке, један поред другог.\n" #~ "\n" -#~ "Можете да користите наредбу „diff3“ да прикажете разлике између три " -#~ "датотеке.\n" -#~ "Када два корисника направе независне измене у заједничком оригиналу, " -#~ "дифф3\n" -#~ "може да извести о разликама између оригинала и два измењена издања, и " -#~ "може да\n" -#~ "направи стопљену датотеку која заједно садржи измене обе особе са " -#~ "упозорењима о сукобима.\n" +#~ "Можете да користите наредбу „diff3“ да прикажете разлике између три датотеке.\n" +#~ "Када два корисника направе независне измене у заједничком оригиналу, дифф3\n" +#~ "може да извести о разликама између оригинала и два измењена издања, и може да\n" +#~ "направи стопљену датотеку која заједно садржи измене обе особе са упозорењима о сукобима.\n" #~ "\n" #~ "Можете да користите наредбу „sdiff“ да међудејствено стопите две датотеке." #~ msgid "" #~ "The GNU Find Utilities are the basic directory searching utilities of\n" -#~ "the GNU operating system. These programs are typically used in " -#~ "conjunction\n" -#~ "with other programs to provide modular and powerful directory search and " -#~ "file\n" +#~ "the GNU operating system. These programs are typically used in conjunction\n" +#~ "with other programs to provide modular and powerful directory search and file\n" #~ "locating capabilities to other commands.\n" #~ "\n" #~ "The tools supplied with this package are:\n" @@ -1442,15 +1452,13 @@ msgstr "пратим преусмеравање на „~a“...~%" #~ "Алати који иду уз овај пакет су:\n" #~ "\n" #~ " * find — тражи датотеке у хијерархији директоријума;\n" -#~ " * locate — исписује датотеке у базама података које одговарају " -#~ "шаблону;\n" +#~ " * locate — исписује датотеке у базама података које одговарају шаблону;\n" #~ " * updatedb — освежава базу података назива датотеке;\n" #~ " * xargs — гради редове извршавања наредбе са стандардног улаза.\n" #~ msgid "" #~ "The GNU Core Utilities are the basic file, shell and text manipulation\n" -#~ "utilities of the GNU operating system. These are the core utilities " -#~ "which\n" +#~ "utilities of the GNU operating system. These are the core utilities which\n" #~ "are expected to exist on every operating system." #~ msgstr "" #~ "Гнуова кључна помагала су основни алати за управљање датотекама, шкољком\n" @@ -1461,33 +1469,25 @@ msgstr "пратим преусмеравање на „~a“...~%" #~ "Make is a tool which controls the generation of executables and other\n" #~ "non-source files of a program from the program's source files.\n" #~ "\n" -#~ "Make gets its knowledge of how to build your program from a file called " -#~ "the\n" -#~ "makefile, which lists each of the non-source files and how to compute it " -#~ "from\n" -#~ "other files. When you write a program, you should write a makefile for " -#~ "it, so\n" +#~ "Make gets its knowledge of how to build your program from a file called the\n" +#~ "makefile, which lists each of the non-source files and how to compute it from\n" +#~ "other files. When you write a program, you should write a makefile for it, so\n" #~ "that it is possible to use Make to build and install the program." #~ msgstr "" -#~ "Мејк је алат који управља стварањем извршних и других не-изворних " -#~ "датотека\n" +#~ "Мејк је алат који управља стварањем извршних и других не-изворних датотека\n" #~ "програма из изворних датотека програма.\n" #~ "\n" -#~ "Мејк сазнаје како да изгради ваш програм из датотеке зване „makefile“, " -#~ "која\n" -#~ "исписује сваку не-изворну датотеку и како да је прорчуна из других " -#~ "датотека.\n" +#~ "Мејк сазнаје како да изгради ваш програм из датотеке зване „makefile“, која\n" +#~ "исписује сваку не-изворну датотеку и како да је прорчуна из других датотека.\n" #~ "Када пишете програм треба да напишете и његову „makefile“ датотеку, тако\n" #~ "да буде могуће користити Мејк за изградњу и инсталацију програма." #~ msgid "" #~ "The GNU Binutils are a collection of binary tools. The main ones are\n" -#~ "`ld' (the GNU linker) and `as' (the GNU assembler). They also include " -#~ "the\n" +#~ "`ld' (the GNU linker) and `as' (the GNU assembler). They also include the\n" #~ "BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc." #~ msgstr "" -#~ "Гнуова бинпомагала јесу скуп бинарних алата. Главни су „ld“ (Гнуов " -#~ "везник) и „as“ (Гнуов асемблер). У њих такође спадају библиотека „BFD“\n" +#~ "Гнуова бинпомагала јесу скуп бинарних алата. Главни су „ld“ (Гнуов везник) и „as“ (Гнуов асемблер). У њих такође спадају библиотека „BFD“\n" #~ "(Binary File Descriptor), „gprof“, „nm“, „strip“, итд." #~ msgid "" @@ -1501,66 +1501,48 @@ msgstr "пратим преусмеравање на „~a“...~%" #~ msgid "" #~ "GNU Guile is an implementation of the Scheme programming language, with\n" -#~ "support for many SRFIs, packaged for use in a wide variety of " -#~ "environments.\n" -#~ "In addition to implementing the R5RS Scheme standard and a large subset " -#~ "of\n" +#~ "support for many SRFIs, packaged for use in a wide variety of environments.\n" +#~ "In addition to implementing the R5RS Scheme standard and a large subset of\n" #~ "R6RS, Guile includes a module system, full access to POSIX system calls,\n" -#~ "networking support, multiple threads, dynamic linking, a foreign " -#~ "function\n" +#~ "networking support, multiple threads, dynamic linking, a foreign function\n" #~ "call interface, and powerful string processing." #~ msgstr "" #~ "Гну Гуиле је примена програмског језика Шеме, са подршком за многе\n" #~ "СРФИ-ове запакован за коришћење у разним окружењима.\n" #~ "Као додатак примене Р5РС стандарда Шеме и великог подскупа Р6РС, Гуиле\n" -#~ "обухвата систем модула, потпун приступ системским позивима ПОСИКС-а, " -#~ "пподршку умрежавања, вишеструке нити, динамичко повезивање, сучеље " -#~ "позива\n" +#~ "обухвата систем модула, потпун приступ системским позивима ПОСИКС-а, пподршку умрежавања, вишеструке нити, динамичко повезивање, сучеље позива\n" #~ "страних функција, и моћну обраду ниске." #~ msgid "" #~ "GNU Guile-Ncurses is a library for the Guile Scheme interpreter that\n" -#~ "provides functions for creating text user interfaces. The text user " -#~ "interface\n" -#~ "functionality is built on the ncurses libraries: curses, form, panel, " -#~ "and\n" +#~ "provides functions for creating text user interfaces. The text user interface\n" +#~ "functionality is built on the ncurses libraries: curses, form, panel, and\n" #~ "menu." #~ msgstr "" -#~ "Гну Гуиле Ен-курсис је библиотека за преводиоца Гуле Шеме која " -#~ "обезбеђује\n" -#~ "функције за стварање текстуалног корисничког сучеља. Функционалност " -#~ "текстуалног\n" -#~ "корисничког сучеља је изграђена на ен-курсис библиотекама: „curses, " -#~ "form,\n" +#~ "Гну Гуиле Ен-курсис је библиотека за преводиоца Гуле Шеме која обезбеђује\n" +#~ "функције за стварање текстуалног корисничког сучеља. Функционалност текстуалног\n" +#~ "корисничког сучеља је изграђена на ен-курсис библиотекама: „curses, form,\n" #~ "panel, и menu“." #~ msgid "" #~ "The GNU package mcron (Mellor's cron) is a 100% compatible replacement\n" -#~ "for Vixie cron. It is written in pure Guile, and allows configuration " -#~ "files\n" -#~ "to be written in scheme (as well as Vixie's original format) for " -#~ "infinite\n" -#~ "flexibility in specifying when jobs should be run. Mcron was written by " -#~ "Dale\n" +#~ "for Vixie cron. It is written in pure Guile, and allows configuration files\n" +#~ "to be written in scheme (as well as Vixie's original format) for infinite\n" +#~ "flexibility in specifying when jobs should be run. Mcron was written by Dale\n" #~ "Mellor." #~ msgstr "" -#~ "Гнуов пакет „mcron“ (Мелоров крон) је 100% сагласна замена за Викси " -#~ "крон.\n" -#~ "Написан је у чистом Гуилу, и допушта да датотеке подешавања буду " -#~ "записане\n" +#~ "Гнуов пакет „mcron“ (Мелоров крон) је 100% сагласна замена за Викси крон.\n" +#~ "Написан је у чистом Гуилу, и допушта да датотеке подешавања буду записане\n" #~ "у шеми (као и у Виксијевом изворном запису) са бескрајном сагласношћу у\n" #~ "навођењу када послови требају да се покрену. Написао га је Дејл Мелор." #~ msgid "" #~ "GNU recutils is a set of tools and libraries to access human-editable,\n" -#~ "text-based databases called recfiles. The data is stored as a sequence " -#~ "of\n" +#~ "text-based databases called recfiles. The data is stored as a sequence of\n" #~ "records, each record containing an arbitrary number of named fields." #~ msgstr "" -#~ "Гну рекутилс је скуп алата и библиотека за приступ базама података " -#~ "заснованим на\n" -#~ "тексту, званим „recfiles“ које корисници могу да мењају. Подаци су " -#~ "ускладиштени\n" +#~ "Гну рекутилс је скуп алата и библиотека за приступ базама података заснованим на\n" +#~ "тексту, званим „recfiles“ које корисници могу да мењају. Подаци су ускладиштени\n" #~ "као низ снимака, сваки снимак садржи одговарајући број именованих поља." #~ msgid "profile `~a' does not exist~%" diff --git a/pre-inst-env.in b/pre-inst-env.in index acdce61168..e90e1b0ac4 100644 --- a/pre-inst-env.in +++ b/pre-inst-env.in @@ -1,7 +1,7 @@ #!/bin/sh # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +# Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> # # This file is part of GNU Guix. # @@ -44,7 +44,12 @@ export PATH NIX_ROOT_FINDER="$abs_top_builddir/nix/scripts/list-runtime-roots" NIX_SUBSTITUTERS="$abs_top_builddir/nix/scripts/substitute-binary" NIX_SETUID_HELPER="$abs_top_builddir/nix-setuid-helper" -export NIX_ROOT_FINDER NIX_SETUID_HELPER NIX_SUBSTITUTERS +NIX_BUILD_HOOK="$abs_top_builddir/nix/scripts/offload" +export NIX_ROOT_FINDER NIX_SETUID_HELPER NIX_SUBSTITUTERS NIX_BUILD_HOOK + +# The 'guix-register' program. +GUIX_REGISTER="$abs_top_builddir/guix-register" +export GUIX_REGISTER # The following variables need only be defined when compiling Guix # modules, but we define them to be on the safe side in case of diff --git a/tests/guix-register.sh b/tests/guix-register.sh index ca28fb0d95..ee633af4f9 100644 --- a/tests/guix-register.sh +++ b/tests/guix-register.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2013 Ludovic Courtès <ludo@gnu.org> +# Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> # # This file is part of GNU Guix. # @@ -29,6 +29,33 @@ rm -rf "$new_store" exit_hook=":" trap "chmod -R +w $new_store ; rm -rf $new_store $closure ; \$exit_hook" EXIT +# +# Registering items in the current store---i.e., without '--prefix'. +# + +new_file="$NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-guix-register-$$" +echo "Fake store file to test registration." > "$new_file" + +# Register the file with zero references and no deriver. +guix-register <<EOF +$new_file + +0 +EOF + +# Make sure it's valid, and delete it. +guile -c " + (use-modules (guix store)) + (define s (open-connection)) + (exit (and (valid-path? s \"$new_file\") + (null? (references s \"$new_file\")) + (pair? (delete-paths s (list \"$new_file\")))))" + + +# +# Registering items in a new store, with '--prefix'. +# + mkdir -p "$new_store/$storedir" new_store_dir="`cd "$new_store/$storedir" ; pwd`" new_store="`cd "$new_store" ; pwd`" diff --git a/tests/hash.scm b/tests/hash.scm index 27751023d3..9bcd69440b 100644 --- a/tests/hash.scm +++ b/tests/hash.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,6 +37,14 @@ (base16-string->bytevector "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9")) +(define (supports-unbuffered-cbip?) + "Return #t if unbuffered custom binary input ports (CBIPs) are supported. +In Guile <= 2.0.9, CBIPs were always fully buffered, so the +'open-sha256-input-port' does not work there." + (false-if-exception + (setvbuf (make-custom-binary-input-port "foo" pk #f #f #f) _IONBF))) + + (test-begin "hash") (test-equal "sha256, empty" @@ -68,6 +76,55 @@ (equal? (sha256 contents) (call-with-input-file file port-sha256)))) +(test-skip (if (supports-unbuffered-cbip?) 0 4)) + +(test-equal "open-sha256-input-port, empty" + `("" ,%empty-sha256) + (let-values (((port get) + (open-sha256-input-port (open-string-input-port "")))) + (let ((str (get-string-all port))) + (list str (get))))) + +(test-equal "open-sha256-input-port, hello" + `("hello world" ,%hello-sha256) + (let-values (((port get) + (open-sha256-input-port + (open-bytevector-input-port + (string->utf8 "hello world"))))) + (let ((str (get-string-all port))) + (list str (get))))) + +(test-equal "open-sha256-input-port, hello, one two" + (list (string->utf8 "hel") (string->utf8 "lo") + (base16-string->bytevector ; echo -n hello | sha256sum + "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824") + " world") + (let-values (((port get) + (open-sha256-input-port + (open-bytevector-input-port (string->utf8 "hello world"))))) + (let* ((one (get-bytevector-n port 3)) + (two (get-bytevector-n port 2)) + (hash (get)) + (three (get-string-all port))) + (list one two hash three)))) + +(test-equal "open-sha256-input-port, hello, read from wrapped port" + (list (string->utf8 "hello") + (base16-string->bytevector ; echo -n hello | sha256sum + "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824") + " world") + (let*-values (((wrapped) + (open-bytevector-input-port (string->utf8 "hello world"))) + ((port get) + (open-sha256-input-port wrapped))) + (let* ((hello (get-bytevector-n port 5)) + (hash (get)) + + ;; Now read from WRAPPED to make sure its current position is + ;; correct. + (world (get-string-all wrapped))) + (list hello hash world)))) + (test-end) diff --git a/tests/nar.scm b/tests/nar.scm index 6493d76876..9f21f990c8 100644 --- a/tests/nar.scm +++ b/tests/nar.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,11 +18,17 @@ (define-module (test-nar) #:use-module (guix nar) + #:use-module (guix store) + #:use-module ((guix hash) #:select (open-sha256-input-port)) #:use-module (rnrs bytevectors) #:use-module (rnrs io ports) + #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) #:use-module (srfi srfi-64) #:use-module (ice-9 ftw) + #:use-module (ice-9 regex) #:use-module (ice-9 match)) ;; Test the (guix nar) module. @@ -156,6 +162,24 @@ (string-append (dirname (search-path %load-path "pre-inst-env")) "/test-nar-" (number->string (getpid)))) +;; XXX: Factorize. +(define %seed + (seed->random-state (logxor (getpid) (car (gettimeofday))))) + +(define (random-text) + (number->string (random (expt 2 256) %seed) 16)) + +(define-syntax-rule (let/ec k exp...) + ;; This one appeared in Guile 2.0.9, so provide a copy here. + (let ((tag (make-prompt-tag))) + (call-with-prompt tag + (lambda () + (let ((k (lambda args + (apply abort-to-prompt tag args)))) + exp...)) + (lambda (_ . args) + (apply values args))))) + (test-begin "nar") @@ -201,6 +225,83 @@ (lambda () (rmdir input))))) +;; 'restore-file-set' depends on 'open-sha256-input-port', which in turn +;; relies on a Guile 2.0.10+ feature. +(test-skip (if (false-if-exception + (open-sha256-input-port (%make-void-port "r"))) + 0 + 3)) + +(test-assert "restore-file-set (signed, valid)" + (with-store store + (let* ((texts (unfold (cut >= <> 10) + (lambda _ (random-text)) + 1+ + 0)) + (files (map (cut add-text-to-store store "text" <>) texts)) + (dump (call-with-bytevector-output-port + (cut export-paths store files <>)))) + (delete-paths store files) + (and (every (negate file-exists?) files) + (let* ((source (open-bytevector-input-port dump)) + (imported (restore-file-set source))) + (and (equal? imported files) + (every (lambda (file) + (and (file-exists? file) + (valid-path? store file))) + files) + (equal? texts + (map (lambda (file) + (call-with-input-file file + get-string-all)) + files)))))))) + +(test-assert "restore-file-set (missing signature)" + (let/ec return + (with-store store + (let* ((file (add-text-to-store store "foo" "Hello, world!")) + (dump (call-with-bytevector-output-port + (cute export-paths store (list file) <> + #:sign? #f)))) + (delete-paths store (list file)) + (and (not (file-exists? file)) + (let ((source (open-bytevector-input-port dump))) + (guard (c ((nar-signature-error? c) + (let ((message (condition-message c)) + (port (nar-error-port c))) + (return + (and (string-match "lacks.*signature" message) + (string=? file (nar-error-file c)) + (eq? source port)))))) + (restore-file-set source)) + #f)))))) + +(test-assert "restore-file-set (corrupt)" + (let/ec return + (with-store store + (let* ((file (add-text-to-store store "foo" + (random-text))) + (dump (call-with-bytevector-output-port + (cute export-paths store (list file) <>)))) + (delete-paths store (list file)) + + ;; Flip a byte in the file contents. + (let* ((index 120) + (byte (bytevector-u8-ref dump index))) + (bytevector-u8-set! dump index (logxor #xff byte))) + + (and (not (file-exists? file)) + (let ((source (open-bytevector-input-port dump))) + (guard (c ((nar-invalid-hash-error? c) + (let ((message (condition-message c)) + (port (nar-error-port c))) + (return + (and (string-contains message "hash") + (string=? file (nar-error-file c)) + (eq? source port)))))) + (restore-file-set source)) + #f)))))) + (test-end "nar") diff --git a/tests/store.scm b/tests/store.scm index 4bd739e7f6..a61d449fb4 100644 --- a/tests/store.scm +++ b/tests/store.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -162,6 +162,38 @@ (equal? (valid-derivers %store o) (list (derivation-file-name d)))))) +(test-assert "topologically-sorted, one item" + (let* ((a (add-text-to-store %store "a" "a")) + (b (add-text-to-store %store "b" "b" (list a))) + (c (add-text-to-store %store "c" "c" (list b))) + (d (add-text-to-store %store "d" "d" (list c))) + (s (topologically-sorted %store (list d)))) + (equal? s (list a b c d)))) + +(test-assert "topologically-sorted, several items" + (let* ((a (add-text-to-store %store "a" "a")) + (b (add-text-to-store %store "b" "b" (list a))) + (c (add-text-to-store %store "c" "c" (list b))) + (d (add-text-to-store %store "d" "d" (list c))) + (s1 (topologically-sorted %store (list d a c b))) + (s2 (topologically-sorted %store (list b d c a b d)))) + (equal? s1 s2 (list a b c d)))) + +(test-assert "topologically-sorted, more difficult" + (let* ((a (add-text-to-store %store "a" "a")) + (b (add-text-to-store %store "b" "b" (list a))) + (c (add-text-to-store %store "c" "c" (list b))) + (d (add-text-to-store %store "d" "d" (list c))) + (w (add-text-to-store %store "w" "w")) + (x (add-text-to-store %store "x" "x" (list w))) + (y (add-text-to-store %store "y" "y" (list x d))) + (s1 (topologically-sorted %store (list y))) + (s2 (topologically-sorted %store (list c y))) + (s3 (topologically-sorted %store (cons y (references %store y))))) + (and (equal? s1 (list w x a b c d y)) + (equal? s2 (list a b c w x d y)) + (lset= string=? s1 s3)))) + (test-assert "log-file, derivation" (let* ((b (add-text-to-store %store "build" "echo $foo > $out" '())) (s (add-to-store %store "bash" #t "sha256" @@ -389,6 +421,26 @@ Deriver: ~a~%" (pk 'corrupt-imported imported) #f))))) +(test-assert "register-path" + (let ((file (string-append (%store-prefix) "/" (make-string 32 #\f) + "-fake"))) + (when (valid-path? %store file) + (delete-paths %store (list file))) + (false-if-exception (delete-file file)) + + (let ((ref (add-text-to-store %store "ref-of-fake" (random-text))) + (drv (string-append file ".drv"))) + (call-with-output-file file + (cut display "This is a fake store item.\n" <>)) + (register-path file + #:references (list ref) + #:deriver drv) + + (and (valid-path? %store file) + (equal? (references %store file) (list ref)) + (null? (valid-derivers %store file)) + (null? (referrers %store file)))))) + (test-end "store") diff --git a/tests/utils.scm b/tests/utils.scm index 017d9170fa..b5706aa792 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -139,6 +139,36 @@ (append pids1 pids2))) (equal? (get-bytevector-all decompressed) data))))) +(test-equal "fcntl-flock" + 0 ; the child's exit status + (let ((file (open-input-file (search-path %load-path "guix.scm")))) + (fcntl-flock file 'read-lock) + (match (primitive-fork) + (0 + (dynamic-wind + (const #t) + (lambda () + ;; Taking a read lock should be OK. + (fcntl-flock file 'read-lock) + (fcntl-flock file 'unlock) + + (catch 'flock-error + (lambda () + ;; Taking an exclusive lock should raise an exception. + (fcntl-flock file 'write-lock)) + (lambda args + (primitive-exit 0))) + (primitive-exit 1)) + (lambda () + (primitive-exit 2)))) + (pid + (match (waitpid pid) + ((_ . status) + (let ((result (status:exit-val status))) + (fcntl-flock file 'unlock) + (close-port file) + result))))))) + ;; This is actually in (guix store). (test-equal "store-path-package-name" "bash-4.2-p24" |