aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/gnulinux/guix_system.md13
-rw-r--r--docs/install/x200_external.md28
-rwxr-xr-xlibs/common7
-rwxr-xr-xlibs/git2
-rwxr-xr-xlibs/project95
5 files changed, 109 insertions, 36 deletions
diff --git a/docs/gnulinux/guix_system.md b/docs/gnulinux/guix_system.md
index f754dcdc..2fad5d99 100644
--- a/docs/gnulinux/guix_system.md
+++ b/docs/gnulinux/guix_system.md
@@ -179,7 +179,7 @@ desired partition name.
Make filesystem on the respective partition, where “fsname” is any
desired filesystem name.
-`mkfs.ext4 -L fsname /dev/mapper/partname`
+`mkfs.btrfs -L fsname /dev/mapper/partname`
Mount the respective filesystem under the current system.
@@ -254,7 +254,7 @@ Snippet:
(device
(file-system-label "fsname"))
(mount-point "/")
- (type "ext4")
+ (type "btrfs")
(dependencies mapped-devices)))
%base-file-systems))
(users
@@ -269,8 +269,7 @@ Snippet:
(packages
(append
(list
- nss-certs
- gvfs)
+ nss-certs)
%base-packages))
(services
(append
@@ -347,7 +346,7 @@ regular boot steps without requiring manual intervention. You can
start logging in as regualar user with the respective "username".
You will have to periodically (at your convenient time) login as root
-and do the latter part of post-installation section, to keep your
+and do the update/upgrade part of post-installation section, to keep your
guix distribution and guix system updated.
That is it! You have now setup guix system with full-disk encryption
@@ -373,7 +372,7 @@ libreboot’s functionalities better.
License
=======
-Copyright (C) 2019 RAGHAV "RG/RVGN" GURURAJAN (rg@rvgn.net).
+Copyright (C) 2019 RAGHAV "RG" GURURAJAN (raghavgururajan@disroot.org).
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
@@ -381,4 +380,4 @@ or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license can be found at
-"https://www.gnu.org/licenses/fdl-1.3.en.html".
+"https://www.gnu.org/licenses/fdl-1.3.en.html". \ No newline at end of file
diff --git a/docs/install/x200_external.md b/docs/install/x200_external.md
index 327d8b88..0b574a68 100644
--- a/docs/install/x200_external.md
+++ b/docs/install/x200_external.md
@@ -216,22 +216,28 @@ Intel Turbo Memory
==================
Some X200 devices were sold with Intel Turbo Memory installed in the top-most
-mini PCI-e slot. This has been [shown to be
-ineffective](http://www.anandtech.com/show/2252) at disk caching or battery
-saving in most use cases. While there are [Linux
-drivers](https://github.com/yarrick/turbomem) available, it is blacklisted in
-at least GNU+Trisquel, and possibly other free operating systems. It should
-probably be removed.
+mini PCI-e slot.
+
+If you have one installed, you should probably remove it as it mostly likely
+brings no benefits, while having many issues:
+- It has been [shown to be
+ ineffective](http://www.anandtech.com/show/2252) at disk caching or battery
+ saving in most use cases. Having it installed might lead to more
+ battery consumption.
+- Using it will most likely lead to data loss because with its
+ [driver](https://github.com/yarrick/turbomem),
+ "data cannot be written/read back reliably". The driver development
+ has also stopped.
+- It might also be a security risk as it may have access to the system
+ RAM through the PCIe bus.
Memory
======
You need DDR3 SODIMM PC3-8500 RAM installed, in matching pairs
-(speed/size). Non-matching pairs won't work. You can also install a
-single module (meaning, one of the slots will be empty) in slot 0.
-
-NOTE: according to users repors, non matching pairs (e.g. 1+2 GiB) might
-work in some cases.
+(speed/size) as some non-matching pairs are known not to work.
+You can also install a single module (meaning, one of the
+slots will be empty) in slot 0.
Make sure that the RAM you buy is the 2Rx8 density.
diff --git a/libs/common b/libs/common
index 06b411e1..b1091e4f 100755
--- a/libs/common
+++ b/libs/common
@@ -117,6 +117,13 @@ diff_patch() {
patch -fd "$sources_path" -r - < "$patch_path"
}
+diff_patch_check() {
+ local sources_path=$1
+ local patch_path=$2
+
+ patch -sfd "$sources_path" --dry-run < "$patch_path" > /dev/null 2>&1
+}
+
path_wildcard_expand() {
local path=$@
diff --git a/libs/git b/libs/git
index 429d4783..2cde3dd3 100755
--- a/libs/git
+++ b/libs/git
@@ -312,7 +312,7 @@ git_project_patch_recursive() {
git_patch "$repository_path" "$branch" "$patch" || return 1
done
- if [[ $path != . ]]; then
+ if [[ -n $path && $path != . ]]; then
git_project_patch_recursive "$project" "$repository" "$branch" "$(dirname "$path")"
fi
}
diff --git a/libs/project b/libs/project
index 8f4ef233..2b6fc2fd 100755
--- a/libs/project
+++ b/libs/project
@@ -126,14 +126,13 @@ project_function_check() {
local project=$1
local function=$2
- project_include "$project"
-
- if ! function_check "$function"
- then
- return 1
- fi
+ (
+ project_include "$project"
- return 0
+ if ! function_check "$function"; then
+ exit 1
+ fi
+ )
}
project_action() {
@@ -521,23 +520,75 @@ project_sources_archive_missing_check() {
project_sources_prepare() {
local project="$1"
- local sources_path="$2"
+ shift
- # Not implemented yet / May end up not being needed
- #project_sources_prepare_blobs
- project_sources_prepare_patch "$project" "$sources_path" "$@"
+ project_sources_prepare_blobs "$project" "$@"
+ project_sources_prepare_patch "$project" "$@"
+}
+
+project_sources_prepare_blobs() {
+ local project=$1
+ shift
+
+ local sources_path=$(project_sources_path "$project" "$project" "$@")
+
+ (
+ cd "$sources_path" || exit 1
+
+ project_blobs "$project" "$@" | while IFS='' read -r blob; do
+ rm -f -- "$blob"
+ done
+ )
}
project_sources_prepare_patch() {
local project="$1"
- local sources_path="$2"
+ shift
- local project_path="$(project_path "$project")"
- local patches_path="$project_path/$PATCHES"
+ local argument
+ local path
+
+ for argument in "$@"; do
+ if [[ -z $path ]]; then
+ path=$argument
+ else
+ path=$path/$argument
+ fi
+ done
+
+ if [[ -n $project ]]; then
+ project_sources_patch_recursive "$project" "$path"
+ fi
+}
+
+project_sources_prepare_check() {
+ local project=$1
+ shift
+
+ local sources_path=$(project_sources_path "$project" "$project" "$@")
+
+ directory_filled_check "$sources_path"
+}
+
+project_sources_patch_recursive() {
+ local project=$1
+ local path=$2
+
+ local project_path=$(project_path "$project")
+ local sources_path=$(project_sources_path "$project" "$project" "$@")
+ local patches_path=$project_path/$PATCHES/$path
+
+ if ! [[ -d $project_path/$PATCHES ]]; then
+ return 0
+ fi
for patch in "$patches_path"/[!.]*.@(patch|diff); do
- diff_patch "$sources_path" "$patch"
+ project_sources_patch "$sources_path" "$patch" || return 1
done
+
+ if [[ -n $path && $path != . ]]; then
+ project_sources_patch_recursive "$project" "$(dirname "$path")"
+ fi
}
project_blobs() {
@@ -556,6 +607,17 @@ project_blobs() {
fi
}
+project_sources_patch() {
+ local sources_path=$1
+ local patch_path=$2
+
+ if diff_patch_check "$sources_path" "$patch_path"; then
+ diff_patch "$sources_path" "$patch_path"
+ else
+ return 1
+ fi
+}
+
project_blobs_path() {
local project=$1
shift
@@ -751,8 +813,7 @@ project_download_archive() {
mv "${archive_path%.tar*}" "$sources_path"
fi
- # Patch the source, if necessary
- project_sources_prepare "$project" "$sources_path"
+ project_sources_prepare "$project"
}
project_download_check_archive() {