#! /bin/sh # -*-scheme-*- build_aux=$(dirname $0) srcdir=$build_aux/.. export LC_ALL=en_US.UTF-8 export TZ=UTC0 exec guile --no-auto-compile -L $srcdir -C $srcdir -e main -s "$0" "$@" !# ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2024 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; ;;; This program 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. ;;; ;;; This program 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 this program. If not, see . ;;;; Commentary: ;;; ;;; This script provides an xgettext wrapper to (re)set POT-Creation-Date from ;;; a Git timestamp. Test doing something like: ;;; ;;; build-aux/xgettext.scm --files-from=po/guix/POTFILES.in --default-domain=test ;;; ;;;; Code: (use-modules (srfi srfi-1) (srfi srfi-26) (ice-9 curried-definitions) (ice-9 match) (ice-9 popen) (ice-9 rdelim) (guix build utils)) (define ((option? name) option) (string-prefix? name option)) (define (get-option args name) (let ((option (find (option? name) args))) (and option (substring option (string-length name))))) (define (pipe-command command) (let* ((port (apply open-pipe* OPEN_READ command)) (output (read-string port))) (close-port port) output)) ;;; ;;; Entry point. ;;; (define (main args) (fluid-set! %default-port-encoding #f) (let* ((files-from (get-option args "--files-from=")) (default-domain (get-option args "--default-domain=")) (directory (or (get-option args "--directory=") ".")) (xgettext (or (get-option args "--xgettext=") "xgettext")) (xgettext-args (filter (negate (option? "--xgettext=")) args)) (command (match xgettext-args ((xgettext.scm args ...) `(,xgettext ,@args)))) (result (apply system* command)) (status (/ result 256))) (if (or (not (zero? status)) (not files-from)) (exit status) (let* ((text (with-input-from-file files-from read-string)) (lines (string-split text #\newline)) (files (filter (negate (cute string-prefix? "#" <>)) lines)) (files (map (cute string-append directory "/" <>) files)) (git-command `("git" "log" "--pretty=format:%ci" "-n1" ,@files)) (timestamp (pipe-command git-command)) (source-date-epoch (or (getenv "SOURCE_DATE_EPOCH") "1")) (timestamp (if (string-null? timestamp) source-date-epoch timestamp)) (po-file (string-append default-domain ".po"))) (substitute* po-file (("(\"POT-Creation-Date: )[^\\]*" all header) (string-append header timestamp))))))) f162d699384a'>services: ganeti: Add support for cluster hooks....* gnu/services/ganeti.scm (<ganeti-configuration>): Add HOOKS. (hooks->directory): Rename to ... (debootstrap-hooks->directory): ... this, for clarity. (debootstrap-configuration-compiler): Adjust accordingly. (ganeti-directory): Add HOOKS when set. (ganeti-etc-service): Pass HOOKS. * doc/guix.texi (Virtualization Services): Mention it. Marius Bakke 2022-11-03services: ganeti: OS variants can be a directory....* gnu/services/ganeti.scm (<ganeti-os>)[extension]: Default to #f. (ganeti-os->directory): Only add extension if set. Support a file-like object for VARIANTS. * doc/guix.texi (Virtualization Services): Document this change and add example. Update Ganeti URLs while at it. Marius Bakke 2021-11-30services: Accept <inferior-package>s in lieu of <package>s....* gnu/services/authentication.scm (fprintd-configuration) (nslcd-configuration): Substitute file-like objects for package ones. * gnu/services/cgit.scm (cgit-configuration, opaque-cgit-configuration): Likewise. * gnu/services/cups.scm (package-list?, cups-configuration): Likewise. * gnu/services/dns.scm (verify-knot-configuration) (ddclient-configuration): Likewise. * gnu/services/docker.scm (docker-configuration): Likewise. * gnu/services/file-sharing.scm (transmission-daemon-configuration): Likewise. * gnu/services/getmail.scm (getmail-configuration): Likewise. * gnu/services/mail.scm (dovecot-configuration) (opaque-dovecot-configuration): Likewise. * gnu/services/messaging.scm (prosody-configuration) (opaque-prosody-configuration): Likewise. * gnu/services/monitoring.scm (zabbix-server-configuration) (zabbix-agent-configuration): Likewise. * gnu/services/networking.scm (opendht-configuration): Likewise. * gnu/services/pm.scm (tlp-configuration): Likewise. * gnu/services/telephony.scm (jami-configuration): Likewise. * gnu/services/virtualization.scm (libvirt-configuration) (qemu-guest-agent-configuration): Likewise. * gnu/services/vpn.scm (openvpn-client-configuration): Likewise. Tobias Geerinckx-Rice 2021-10-11services: ganeti: Don't start the metadata daemon automatically....* gnu/services/ganeti.scm (ganeti-metad-service)[auto-start?]: New field. Marius Bakke