From patchwork Mon Sep 2 15:33:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15257 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D7BF91734D; Mon, 2 Sep 2019 16:38:25 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 3E85E17329 for ; Mon, 2 Sep 2019 16:38:25 +0100 (BST) Received: from localhost ([::1]:37670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oPQ-0005W2-9v for patchwork@mira.cbaines.net; Mon, 02 Sep 2019 11:38:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42962) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oMa-0002cK-Cb for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4oMX-0005DR-TP for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:28 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50055) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4oMU-00058e-VM for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:24 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i4oMU-0006gM-Qo for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:22 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v3 48/48] wip: tools. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Sep 2019 15:35:22 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36477 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 36477@debbugs.gnu.org Received: via spool by 36477-submit@debbugs.gnu.org id=B36477.156743849725396 (code B ref 36477); Mon, 02 Sep 2019 15:35:22 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Sep 2019 15:34:57 +0000 Received: from localhost ([127.0.0.1]:58839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oM4-0006bQ-Ft for submit@debbugs.gnu.org; Mon, 02 Sep 2019 11:34:57 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oLn-0006YH-8v for 36477@debbugs.gnu.org; Mon, 02 Sep 2019 11:34:40 -0400 Received: by mail-wr1-f68.google.com with SMTP id j16so14443857wrr.8 for <36477@debbugs.gnu.org>; Mon, 02 Sep 2019 08:34:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dOKChSPIa1zVzvJViPzlsRONmF2dFzkQunlCFu0x5xs=; b=STsxQkQPSdqjCwUKVOElJCbEqAUHxKwsojn7LoGR9QkQV6RkhNQrRZ6vKv7mU9ePip nz56FrhSHMMmK6ofHk9eNNammLc9k561eaXN3PSyXe/GIbBHe4zf3W/sT9VvYkejvm3T fnqibcoKEBcnEHPu9SDdDWkiMSVoShWieQyYGGkDu4pLgkPr2l9ukfhdfsmFp92L5n+X KGcR+h3FIwAsqFXrOkD23jho4YafgoVVGdAIwHqeKd891mv9ZysBqTFmBmlvilhen8Tf EF9Yw4TlLWPTIeDJsSN4jfWP1CwH7N9MjhCNG1M8o3rSJd4pGKHvFDvlbMxPDV08biGn 1LXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dOKChSPIa1zVzvJViPzlsRONmF2dFzkQunlCFu0x5xs=; b=L26qzuw0tzHnC7x6S2NRNROHwJtlq7zi+LCKcPksLzc9M6dsY5clapLwz2X9V6HX6H z+9RAR5sE4OvsS/MO2vCv6ATqnr8LyQQP3RwuSi/9CgI5Qb54NmF9JIxe1xTXZWdr2gH Rwa+eS/6enVLGuwrEHs/4zSeU4wLCnrMNURachTX5Zm/3pc6x5bCpqN60HkNehSPh29e 557X1LaDkbAsGAfz/bsGGZkQzbfT8jjVrf5DRatFUUAQJtiMPZVE/sHJwFhA5GW8c8sx pJT3MXnP8urUlM+gZbO6YS6QKdxoV6mQ1TadmeMJ1rm1qS131R+KQtEoJfHxSZ4Aruo1 /Gfw== X-Gm-Message-State: APjAAAUtbVDYa647c6yaDlR+Z/YtnjMfHYQifSoD2w2bM1GpfvYJ64R0 duXtp0guuzrA1TYlbsmCVqfYvBkN X-Google-Smtp-Source: APXvYqwtOcguFliNB1xxUZv1m4Xypk2TNp2By0jFBRiaTg/LxJ5+jRinx9yXb4EEX5l5P7aXaantag== X-Received: by 2002:a5d:46c4:: with SMTP id g4mr20156998wrs.189.1567438473304; Mon, 02 Sep 2019 08:34:33 -0700 (PDT) Received: from localhost.localdomain ([80.12.63.115]) by smtp.gmail.com with ESMTPSA id b26sm17232265wmj.14.2019.09.02.08.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 08:34:32 -0700 (PDT) From: Mathieu Othacehe Date: Mon, 2 Sep 2019 17:33:33 +0200 Message-Id: <20190902153333.11190-49-m.othacehe@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190902153333.11190-1-m.othacehe@gmail.com> References: <20190902153333.11190-1-m.othacehe@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mathieu Othacehe Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches --- build-sorted-ok-ko-packages.sh | 354 ++++++++++++++++++++++++ deps.scm | 184 ++++++++++++ gnu/system/examples/mini-beaglebone.scm | 61 ++++ gnu/system/examples/mini.scm | 54 ++++ 4 files changed, 653 insertions(+) create mode 100755 build-sorted-ok-ko-packages.sh create mode 100644 deps.scm create mode 100644 gnu/system/examples/mini-beaglebone.scm create mode 100644 gnu/system/examples/mini.scm diff --git a/build-sorted-ok-ko-packages.sh b/build-sorted-ok-ko-packages.sh new file mode 100755 index 0000000000..a2a13dcdfc --- /dev/null +++ b/build-sorted-ok-ko-packages.sh @@ -0,0 +1,354 @@ +#!/bin/bash - + +set -o nounset # Treat unset variables as an error + +mngt_dir() +{ + local dirname=$1 + + rm -rf ${dirname}.bk + if [ -e $dirname ]; then + mv $dirname ${dirname}.bk + fi + mkdir ${dirname} +} + +DEPENDENCIES_DIR="packages-dependencies" +KO_OUT_LOG_DIR="ko-out-log-dir" +OUT_FILE_NAME_BASE="packages-status" +OUT_FILE_NAME_EXT="wiki" +OUT_FILE_NAME=${OUT_FILE_NAME_BASE}.${OUT_FILE_NAME_EXT} + +rm -f ${OUT_FILE_NAME}.bk +if [ -e $OUT_FILE_NAME ]; then + mv $OUT_FILE_NAME ${OUT_FILE_NAME}.bk +fi + +mngt_dir ${DEPENDENCIES_DIR} +mngt_dir ${KO_OUT_LOG_DIR} + +NB_OK=0 +NB_KO=0 +NB_UNKNOWN=0 + +file_header() +{ + local title="Packages status" + + echo "" + echo "start file $OUT_FILE_NAME" + echo "" + + echo "" >> $OUT_FILE_NAME + echo "= $title =" >> $OUT_FILE_NAME + echo "" >> $OUT_FILE_NAME +} + +section_header() +{ + local title=$1 + + echo "" + echo "" + echo "start section \"$title\"" + + echo "" >> $OUT_FILE_NAME + echo "== $title ==" >> $OUT_FILE_NAME + echo "" >> $OUT_FILE_NAME + echo "| package | status | nb dependencies |" >> $OUT_FILE_NAME + + NB_OK=0 + NB_KO=0 + NB_UNKNOWN=0 +} + +section_footer() +{ + echo "" >> $OUT_FILE_NAME + echo "nb packages OK in section: $NB_OK" >> $OUT_FILE_NAME + echo "" >> $OUT_FILE_NAME + echo "nb packages *KO* in section: $NB_KO" >> $OUT_FILE_NAME + echo "" >> $OUT_FILE_NAME + echo "nb packages UNKNOWN in section: $NB_UNKNOWN" >> $OUT_FILE_NAME + echo "" >> $OUT_FILE_NAME + echo "" >> $OUT_FILE_NAME +} + +add_package_status() +{ + local package=$1 + local status=$2 + local nb_deps=$3 + + if [ "$status" = "OK" ]; then + NB_OK=$(($NB_OK+1)) + elif [ "$status" = "KO" ]; then + status="*KO*" + NB_KO=$(($NB_KO+1)) + else + NB_UNKNOWN=$(($NB_UNKNOWN+1)) + fi + + echo "| $package | $status | $nb_deps |" >> $OUT_FILE_NAME +} + +LIST_PACK_SUPPOSED_OK="" + +LIST_PACK_SUPPOSED_OK+=" xz" +LIST_PACK_SUPPOSED_OK+=" tk" +LIST_PACK_SUPPOSED_OK+=" m4" +LIST_PACK_SUPPOSED_OK+=" ed" +LIST_PACK_SUPPOSED_OK+=" bc" +LIST_PACK_SUPPOSED_OK+=" tcl" +LIST_PACK_SUPPOSED_OK+=" sed" +LIST_PACK_SUPPOSED_OK+=" mpc" +LIST_PACK_SUPPOSED_OK+=" lzo" +LIST_PACK_SUPPOSED_OK+=" isl" +LIST_PACK_SUPPOSED_OK+=" gss" +LIST_PACK_SUPPOSED_OK+=" gmp" +LIST_PACK_SUPPOSED_OK+=" bdb" +LIST_PACK_SUPPOSED_OK+=" acl" +LIST_PACK_SUPPOSED_OK+=" zlib" +LIST_PACK_SUPPOSED_OK+=" sudo" +LIST_PACK_SUPPOSED_OK+=" perl" +LIST_PACK_SUPPOSED_OK+=" pcre" +LIST_PACK_SUPPOSED_OK+=" mpfr" +LIST_PACK_SUPPOSED_OK+=" make" +LIST_PACK_SUPPOSED_OK+=" lzip" +LIST_PACK_SUPPOSED_OK+=" gzip" +LIST_PACK_SUPPOSED_OK+=" grep" +LIST_PACK_SUPPOSED_OK+=" gdbm" +LIST_PACK_SUPPOSED_OK+=" gawk" +LIST_PACK_SUPPOSED_OK+=" fuse" +LIST_PACK_SUPPOSED_OK+=" flex" +LIST_PACK_SUPPOSED_OK+=" flac" +LIST_PACK_SUPPOSED_OK+=" file" +LIST_PACK_SUPPOSED_OK+=" fftw" +LIST_PACK_SUPPOSED_OK+=" bash" +LIST_PACK_SUPPOSED_OK+=" attr" +LIST_PACK_SUPPOSED_OK+=" which" +LIST_PACK_SUPPOSED_OK+=" unzip" +LIST_PACK_SUPPOSED_OK+=" rhash" +LIST_PACK_SUPPOSED_OK+=" libuv" +LIST_PACK_SUPPOSED_OK+=" libgc" +LIST_PACK_SUPPOSED_OK+=" libev" +LIST_PACK_SUPPOSED_OK+=" guile" +LIST_PACK_SUPPOSED_OK+=" groff" +LIST_PACK_SUPPOSED_OK+=" gperf" +LIST_PACK_SUPPOSED_OK+=" glibc" +LIST_PACK_SUPPOSED_OK+=" expat" +LIST_PACK_SUPPOSED_OK+=" bzip2" +LIST_PACK_SUPPOSED_OK+=" bison" +LIST_PACK_SUPPOSED_OK+=" xtrans" +LIST_PACK_SUPPOSED_OK+=" tzdata" +LIST_PACK_SUPPOSED_OK+=" sqlite" +LIST_PACK_SUPPOSED_OK+=" shishi" +LIST_PACK_SUPPOSED_OK+=" shadow" +LIST_PACK_SUPPOSED_OK+=" python" +LIST_PACK_SUPPOSED_OK+=" nettle" +LIST_PACK_SUPPOSED_OK+=" libxft" +LIST_PACK_SUPPOSED_OK+=" libxcb" +LIST_PACK_SUPPOSED_OK+=" libxau" +LIST_PACK_SUPPOSED_OK+=" libx11" +LIST_PACK_SUPPOSED_OK+=" libpng" +LIST_PACK_SUPPOSED_OK+=" libogg" +LIST_PACK_SUPPOSED_OK+=" libidn" +LIST_PACK_SUPPOSED_OK+=" libffi" +LIST_PACK_SUPPOSED_OK+=" libelf" +LIST_PACK_SUPPOSED_OK+=" libcap" +LIST_PACK_SUPPOSED_OK+=" libbsd" +LIST_PACK_SUPPOSED_OK+=" indent" +LIST_PACK_SUPPOSED_OK+=" gnutls" +LIST_PACK_SUPPOSED_OK+=" c-ares" +LIST_PACK_SUPPOSED_OK+=" texinfo" +LIST_PACK_SUPPOSED_OK+=" python2" +LIST_PACK_SUPPOSED_OK+=" psutils" +LIST_PACK_SUPPOSED_OK+=" ncurses" +LIST_PACK_SUPPOSED_OK+=" libxslt" +LIST_PACK_SUPPOSED_OK+=" libxml2" +LIST_PACK_SUPPOSED_OK+=" libxext" +LIST_PACK_SUPPOSED_OK+=" libtool" +LIST_PACK_SUPPOSED_OK+=" libtiff" +LIST_PACK_SUPPOSED_OK+=" libssh2" +LIST_PACK_SUPPOSED_OK+=" libltdl" +LIST_PACK_SUPPOSED_OK+=" libjpeg" +LIST_PACK_SUPPOSED_OK+=" libidn2" +LIST_PACK_SUPPOSED_OK+=" jansson" +LIST_PACK_SUPPOSED_OK+=" shepherd" +LIST_PACK_SUPPOSED_OK+=" net-base" +LIST_PACK_SUPPOSED_OK+=" libxdmcp" +LIST_PACK_SUPPOSED_OK+=" libtasn1" +LIST_PACK_SUPPOSED_OK+=" libpaper" +LIST_PACK_SUPPOSED_OK+=" jemalloc" +LIST_PACK_SUPPOSED_OK+=" jbig2dec" +LIST_PACK_SUPPOSED_OK+=" gs-fonts" +LIST_PACK_SUPPOSED_OK+=" freetype" +LIST_PACK_SUPPOSED_OK+=" elfutils" +LIST_PACK_SUPPOSED_OK+=" binutils" +LIST_PACK_SUPPOSED_OK+=" automake" +LIST_PACK_SUPPOSED_OK+=" autoconf" +LIST_PACK_SUPPOSED_OK+=" alsa-lib" +LIST_PACK_SUPPOSED_OK+=" xorgproto" +LIST_PACK_SUPPOSED_OK+=" xcb-proto" +LIST_PACK_SUPPOSED_OK+=" linux-pam" +LIST_PACK_SUPPOSED_OK+=" libvorbis" +LIST_PACK_SUPPOSED_OK+=" libgcrypt" +LIST_PACK_SUPPOSED_OK+=" inetutils" +LIST_PACK_SUPPOSED_OK+=" findutils" +LIST_PACK_SUPPOSED_OK+=" e2fsprogs" +LIST_PACK_SUPPOSED_OK+=" diffutils" +LIST_PACK_SUPPOSED_OK+=" coreutils" +LIST_PACK_SUPPOSED_OK+=" util-linux" +LIST_PACK_SUPPOSED_OK+=" libxrender" +LIST_PACK_SUPPOSED_OK+=" libsndfile" +LIST_PACK_SUPPOSED_OK+=" libsigsegv" +LIST_PACK_SUPPOSED_OK+=" libfontenc" +LIST_PACK_SUPPOSED_OK+=" guile-json" +LIST_PACK_SUPPOSED_OK+=" fontconfig" +LIST_PACK_SUPPOSED_OK+=" util-macros" +LIST_PACK_SUPPOSED_OK+=" mkfontscale" +LIST_PACK_SUPPOSED_OK+=" linux-libre" +LIST_PACK_SUPPOSED_OK+=" ghostscript" +LIST_PACK_SUPPOSED_OK+=" docbook-xsl" +LIST_PACK_SUPPOSED_OK+=" docbook-xml" +LIST_PACK_SUPPOSED_OK+=" bash-static" +LIST_PACK_SUPPOSED_OK+=" libunistring" +LIST_PACK_SUPPOSED_OK+=" libgpg-error" +LIST_PACK_SUPPOSED_OK+=" bash-minimal" +LIST_PACK_SUPPOSED_OK+=" libsamplerate" +LIST_PACK_SUPPOSED_OK+=" libatomic-ops" +LIST_PACK_SUPPOSED_OK+=" e2fsck-static" +LIST_PACK_SUPPOSED_OK+=" wireless-regdb" +LIST_PACK_SUPPOSED_OK+=" python-wrapper" +LIST_PACK_SUPPOSED_OK+=" python-minimal" +LIST_PACK_SUPPOSED_OK+=" guile-readline" +LIST_PACK_SUPPOSED_OK+=" guile-gdbm-ffi" +LIST_PACK_SUPPOSED_OK+=" gettext-minimal" +LIST_PACK_SUPPOSED_OK+=" libpthread-stubs" +LIST_PACK_SUPPOSED_OK+=" openfwwf-firmware" +LIST_PACK_SUPPOSED_OK+=" glibc-utf8-locales" +LIST_PACK_SUPPOSED_OK+=" ath9k-htc-firmware" +LIST_PACK_SUPPOSED_OK+=" linux-libre-headers" +LIST_PACK_SUPPOSED_OK+=" guile-static-stripped" +LIST_PACK_SUPPOSED_OK+=" python-minimal-wrapper" +LIST_PACK_SUPPOSED_OK+=" pkg-config" +LIST_PACK_SUPPOSED_OK+=" libarchive" +LIST_PACK_SUPPOSED_OK+=" cyrus-sasl" +LIST_PACK_SUPPOSED_OK+=" tcsh" +LIST_PACK_SUPPOSED_OK+=" xmlto" +LIST_PACK_SUPPOSED_OK+=" icu4c" # ? +LIST_PACK_SUPPOSED_OK+=" mit-krb5" # ok ? +LIST_PACK_SUPPOSED_OK+=" help2man" +LIST_PACK_SUPPOSED_OK+=" mkfontdir" +LIST_PACK_SUPPOSED_OK+=" lvm2" +LIST_PACK_SUPPOSED_OK+=" eudev" +LIST_PACK_SUPPOSED_OK+=" procps" +LIST_PACK_SUPPOSED_OK+=" alsa-utils" +LIST_PACK_SUPPOSED_OK+=" boost" +LIST_PACK_SUPPOSED_OK+=" swig" +LIST_PACK_SUPPOSED_OK+=" doxygen" +LIST_PACK_SUPPOSED_OK+=" curl" +LIST_PACK_SUPPOSED_OK+=" nghttp2" +LIST_PACK_SUPPOSED_OK+=" openldap" +LIST_PACK_SUPPOSED_OK+=" git-minimal" + + +LIST_PACK_SUPPOSED_KO="" + +LIST_PACK_SUPPOSED_KO+=" libnl" +LIST_PACK_SUPPOSED_KO+=" crda" # depends on libnl +LIST_PACK_SUPPOSED_KO+=" cmake" +LIST_PACK_SUPPOSED_KO+=" guile-wm" +LIST_PACK_SUPPOSED_KO+=" guile-xcb" + +count_dependencies() +{ + local pack="$1" + local depsfile="$DEPENDENCIES_DIR/${pack}.dot" + guix graph -t bag-emerged $pack > $depsfile + count=$(cat $depsfile | grep "\->" | wc -l) + echo $count +} + +build_pack() +{ + local pack="$1" + local out_file=$(mktemp /tmp/test-guix.XXXXX) + local result=0 + + ./pre-inst-env guix build --target=aarch64-linux-gnu $pack > $out_file 2>&1 + result=$? + + if [ $result -eq 0 ]; then + rm -f $out_file + else + mv $out_file ${KO_OUT_LOG_DIR}/${pack}.log + fi + + return $result +} + +build_all_in_list() +{ + local list_pack="$@" + local status=unknown + + for pack in $list_pack; do + echo "" + echo "" + echo "--------------- package $pack ---------------" + echo "" + build_pack $pack + if [ $? -eq 0 ]; then + status="OK" + else + status="KO" + fi + + nb_deps="$(count_dependencies $pack)" + echo " package $pack is $status (and has $nb_deps dependencies)" + echo "" + echo "" + + add_package_status $pack $status $nb_deps + done +} + +if [ $# -ge 1 ]; then + EXEC_SUPPOSED_OK=0 + EXEC_SUPPOSED_KO=0 + while [ $# -ge 1 ]; do + case "$1" in + "--ok") + EXEC_SUPPOSED_OK=1 + ;; + "--ko") + EXEC_SUPPOSED_KO=1 + ;; + *) + echo "Unknown argument $1" + exit 1 + ;; + esac + shift + done +else + EXEC_SUPPOSED_OK=1 + EXEC_SUPPOSED_KO=1 +fi + +file_header + +if [ $EXEC_SUPPOSED_OK -eq 1 ]; then + section_header "Supposed OK Packages" + build_all_in_list $LIST_PACK_SUPPOSED_OK + section_footer +fi + +if [ $EXEC_SUPPOSED_KO -eq 1 ]; then + section_header "Supposed KO Packages" + build_all_in_list $LIST_PACK_SUPPOSED_KO + section_footer +fi + + diff --git a/deps.scm b/deps.scm new file mode 100644 index 0000000000..75e8f106fe --- /dev/null +++ b/deps.scm @@ -0,0 +1,184 @@ +(use-modules (guix) + (guix scripts build) + (gnu) + (ice-9 receive)) + +(define deps + '("sudo" + "guile-xcb" + "guile-wm" + "tzdata" + "guile-gdbm-ffi" + "gzip" + "expat" + "attr" + "gettext-minimal" + "m4" + "perl" + "gmp" + "acl" + "libcap" + "libsigsegv" + "pkg-config" + "zlib" + "libffi" + "glibc" + "bash-static" + "bison" + "texinfo" + "lzip" + "ed" + "libatomic-ops" + "libltdl" + "libunistring" + "libgc" + "linux-libre-headers" + "bzip2" + "bash-minimal" + "diffutils" + "binutils" + "findutils" + "guile" + "sed" + "make" + "gawk" + "xz" + "grep" + "file" + "coreutils" + "glibc-utf8-locales" + "libpng" + "freetype" + "libfontenc" + "mkfontdir" + "mkfontscale" + "guile-readline" + "lzo" + "rhash" + "libuv" + "libarchive" + "cmake" + "ath9k-htc-firmware" + "openfwwf-firmware" + "inetutils" + "tcsh" + "pcre" + "boost" + "swig" + "libnl" + "wireless-regdb" + "flac" + "libsndfile" + "libvorbis" + "libogg" + "xmlto" + "fftw" + "alsa-lib" + "alsa-utils" + "libsamplerate" + "lvm2" + "fuse" + "crda" + "which" + "help2man" + "indent" + "flex" + "gdbm" + "mit-krb5" + "openldap" + "cyrus-sasl" + "curl" + "icu4c" + "bdb" + "libev" + "jemalloc" + "jansson" + "c-ares" + "linux-pam" + "shishi" + "xtrans" + "libbsd" + "python-minimal-wrapper" + "xcb-proto" + "python-minimal" + "gs-fonts" + "fontconfig" + "libxrender" + "libxft" + "tk" + "xorgproto" + "libpthread-stubs" + "util-macros" + "libxau" + "libxext" + "libxcb" + "sqlite" + "libxdmcp" + "libx11" + "libpaper" + "jbig2dec" + "tcl" + "libjpeg" + "libtiff" + "psutils" + "ghostscript" + "groff" + "libgpg-error" + "libtasn1" + "libssh2" + "python2" + "gss" + "libgcrypt" + "nettle" + "libidn" + "nghttp2" + "libidn2" + "git-minimal" + "gnutls" + "guile-json" + "unzip" + "autoconf" + "automake" + "docbook-xml" + "libtool" + "python" + "python-wrapper" + "libxslt" + "libxml2" + "docbook-xsl" + "gperf" + "eudev" + "shadow" + "bash" + "shepherd" + "isl" + "net-base" + "procps" + "util-linux" + "e2fsprogs" + "e2fsck-static" + "guile-static-stripped" + "libelf" + "ncurses" + "mpc" + "bc" + "elfutils" + "mpfr" + "linux-libre")) + +(define store (open-connection)) + +(define arguments + (map (lambda (spec) + `(argument . ,spec)) + deps)) + +(run-with-store store + (mlet %store-monad + ((derivations -> + ((@@ (guix scripts build) options->derivations) + store + `((target . "aarch64-linux-gnu") + ,@arguments)))) + (mbegin %store-monad + (built-derivations derivations)))) diff --git a/gnu/system/examples/mini-beaglebone.scm b/gnu/system/examples/mini-beaglebone.scm new file mode 100644 index 0000000000..6ce0ab1b1c --- /dev/null +++ b/gnu/system/examples/mini-beaglebone.scm @@ -0,0 +1,61 @@ +;; This is an operating system configuration template +;; for a "bare bones" setup, with no X11 display server. + +(use-modules (gnu) (gnu bootloader u-boot)) +(use-service-modules networking ssh) +(use-package-modules bootloaders linux screen) + +(operating-system + (host-name "komputilo") + (timezone "Europe/Berlin") + (locale "en_US.utf8") + + ;; Boot in "legacy" BIOS mode, assuming /dev/sdX is the + ;; target hard disk, and "my-root" is the label of the target + ;; root file system. + (bootloader (bootloader-configuration + (bootloader u-boot-beaglebone-black-bootloader) + (target "/dev/vda"))) + + (kernel linux-libre-arm-omap2plus) + + ;; This module is required to mount the SD card. + (initrd-modules (cons "omap_hsmmc" %base-initrd-modules)) + + (file-systems (cons (file-system + (device (file-system-label "my-root")) + (mount-point "/") + (type "ext4")) + %base-file-systems)) + + ;; This is where user accounts are specified. The "root" + ;; account is implicit, and is initially created with the + ;; empty password. + (users (cons (user-account + (name "alice") + (comment "Bob's sister") + (group "users") + + ;; Adding the account to the "wheel" group + ;; makes it a sudoer. Adding it to "audio" + ;; and "video" allows the user to play sound + ;; and access the webcam. + (supplementary-groups '("wheel" + "audio" "video"))) + %base-user-accounts)) + + ;; Globally-installed packages. + (packages '()) + + ;; Add services to the baseline: a DHCP client and + ;; an SSH server. + (services (list + (service udev-service-type + (udev-configuration + (rules (list lvm2 fuse alsa-utils crda)))) + (agetty-service + (agetty-configuration + (extra-options '("-L")) + (baud-rate "115200") + (term "vt100") + (tty "ttyO0")))))) diff --git a/gnu/system/examples/mini.scm b/gnu/system/examples/mini.scm new file mode 100644 index 0000000000..f7c7b63308 --- /dev/null +++ b/gnu/system/examples/mini.scm @@ -0,0 +1,54 @@ +;; This is an operating system configuration template +;; for a "bare bones" setup, with no X11 display server. + +(use-modules (gnu)) +(use-service-modules networking ssh) +(use-package-modules linux screen) + +(define dummy-bootloader + (bootloader + (inherit grub-bootloader) + (installer #f))) + +(operating-system + (host-name "komputilo") + (timezone "Europe/Berlin") + (locale "en_US.utf8") + + ;; Boot in "legacy" BIOS mode, assuming /dev/sdX is the + ;; target hard disk, and "my-root" is the label of the target + ;; root file system. + (bootloader (bootloader-configuration + (bootloader dummy-bootloader) + (target "/dev/sdX"))) + (file-systems (cons (file-system + (device (file-system-label "my-root")) + (mount-point "/") + (type "ext4")) + %base-file-systems)) + + ;; This is where user accounts are specified. The "root" + ;; account is implicit, and is initially created with the + ;; empty password. + (users (cons (user-account + (name "alice") + (comment "Bob's sister") + (group "users") + + ;; Adding the account to the "wheel" group + ;; makes it a sudoer. Adding it to "audio" + ;; and "video" allows the user to play sound + ;; and access the webcam. + (supplementary-groups '("wheel" + "audio" "video"))) + %base-user-accounts)) + + ;; Globally-installed packages. + (packages '()) + + ;; Add services to the baseline: a DHCP client and + ;; an SSH server. + (services (list + (service udev-service-type + (udev-configuration + (rules (list lvm2 fuse alsa-utils crda)))))))