Skip to content

Commit cf0415a

Browse files
committed
Modificiation
- fix cryptsetup - bump linux45 to 4.5-rc5 - update mhwd-amdgpu
1 parent 06f2d7b commit cf0415a

15 files changed

+324
-51
lines changed

cryptsetup/PKGBUILD

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# $Id: PKGBUILD 250120 2015-11-04 22:05:09Z bpiotrowski $
2+
# Maintainer: Thomas Bächler <[email protected]>
3+
pkgname=cryptsetup
4+
pkgver=1.7.0
5+
pkgrel=1.1
6+
pkgdesc="Userspace setup tool for transparent encryption of block devices using dm-crypt"
7+
arch=(i686 x86_64)
8+
license=('GPL')
9+
url="http://code.google.com/p/cryptsetup/"
10+
groups=('base')
11+
depends=('device-mapper' 'libgcrypt' 'popt' 'libutil-linux')
12+
makedepends=('util-linux')
13+
options=('!emptydirs')
14+
source=(https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/${pkgname}-${pkgver}.tar.xz
15+
#https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/${pkgname}-${pkgver}.tar.sign
16+
encrypt_hook
17+
encrypt_install
18+
sd-encrypt
19+
set-skcipher-key-before-accept-call-in-kernel-crypto-backend.patch::https://gitlab.com/cryptsetup/cryptsetup/commit/93ed401b7c1d298de0a3fe38ae45d96529a8511c.patch
20+
fix-kernel-crypto-backend-to-set-key-before-accept-call-even-for-HMAC.patch::https://gitlab.com/cryptsetup/cryptsetup/commit/4dc88e8ffb6442ebba7ad8d14fa55691734371e0.patch)
21+
#validpgpkeys=('2A2918243FDE46648D0686F9D9B0577BD93E98FC') # Milan Broz <[email protected]>
22+
sha256sums=('075524a7cc0db36d12119fa79116750accb1c6c8825d5faa2534b74b8ce3d148'
23+
'4406f8dc83f4f1b408e49d557515f721d91b358355c71fbe51f74ab27e5c84ff'
24+
'cfe465bdad3d958bb2332a05e04f2e1e884422a5714dfd1a0a3b9b74bf7dc6ae'
25+
'd442304e6a78b3513ebc53be3fe2f1276a7df470c8da701b3ece971d59979bdd'
26+
'995eaf919c1132a29d77138b320f06baba2275039ea27a6254cda4069be012bc'
27+
'a18be6227d22d457a1ed5cd4ffd380550e85bef473d22959193640fafe559547')
28+
29+
prepare() {
30+
cd "${srcdir}"/$pkgname-${pkgver}
31+
patch -Np1 -i "${srcdir}"/set-skcipher-key-before-accept-call-in-kernel-crypto-backend.patch
32+
patch -Np1 -i "${srcdir}"/fix-kernel-crypto-backend-to-set-key-before-accept-call-even-for-HMAC.patch
33+
}
34+
35+
build() {
36+
cd "${srcdir}"/$pkgname-${pkgver}
37+
./configure --prefix=/usr --sbindir=/usr/bin --disable-static --enable-cryptsetup-reencrypt
38+
make
39+
}
40+
41+
package() {
42+
cd "${srcdir}"/$pkgname-${pkgver}
43+
make DESTDIR="${pkgdir}" install
44+
# install hook
45+
install -D -m644 "${srcdir}"/encrypt_hook "${pkgdir}"/usr/lib/initcpio/hooks/encrypt
46+
install -D -m644 "${srcdir}"/encrypt_install "${pkgdir}"/usr/lib/initcpio/install/encrypt
47+
install -D -m644 "${srcdir}"/sd-encrypt "${pkgdir}"/usr/lib/initcpio/install/sd-encrypt
48+
}

cryptsetup/encrypt_hook

+139
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
#!/usr/bin/ash
2+
3+
run_hook() {
4+
modprobe -a -q dm-crypt >/dev/null 2>&1
5+
[ "${quiet}" = "y" ] && CSQUIET=">/dev/null"
6+
7+
# Get keyfile if specified
8+
ckeyfile="/crypto_keyfile.bin"
9+
if [ -n "$cryptkey" ]; then
10+
IFS=: read ckdev ckarg1 ckarg2 <<EOF
11+
$cryptkey
12+
EOF
13+
14+
if [ "$ckdev" = "rootfs" ]; then
15+
ckeyfile=$ckarg1
16+
elif resolved=$(resolve_device "${ckdev}" ${rootdelay}); then
17+
case ${ckarg1} in
18+
*[!0-9]*)
19+
# Use a file on the device
20+
# ckarg1 is not numeric: ckarg1=filesystem, ckarg2=path
21+
mkdir /ckey
22+
mount -r -t "$ckarg1" "$resolved" /ckey
23+
dd if="/ckey/$ckarg2" of="$ckeyfile" >/dev/null 2>&1
24+
umount /ckey
25+
;;
26+
*)
27+
# Read raw data from the block device
28+
# ckarg1 is numeric: ckarg1=offset, ckarg2=length
29+
dd if="$resolved" of="$ckeyfile" bs=1 skip="$ckarg1" count="$ckarg2" >/dev/null 2>&1
30+
;;
31+
esac
32+
fi
33+
[ ! -f ${ckeyfile} ] && echo "Keyfile could not be opened. Reverting to passphrase."
34+
fi
35+
36+
if [ -n "${cryptdevice}" ]; then
37+
DEPRECATED_CRYPT=0
38+
IFS=: read cryptdev cryptname cryptoptions <<EOF
39+
$cryptdevice
40+
EOF
41+
else
42+
DEPRECATED_CRYPT=1
43+
cryptdev="${root}"
44+
cryptname="root"
45+
fi
46+
47+
warn_deprecated() {
48+
echo "The syntax 'root=${root}' where '${root}' is an encrypted volume is deprecated"
49+
echo "Use 'cryptdevice=${root}:root root=/dev/mapper/root' instead."
50+
}
51+
52+
for cryptopt in ${cryptoptions//,/ }; do
53+
case ${cryptopt} in
54+
allow-discards)
55+
cryptargs="${cryptargs} --allow-discards"
56+
;;
57+
*)
58+
echo "Encryption option '${cryptopt}' not known, ignoring." >&2
59+
;;
60+
esac
61+
done
62+
63+
if resolved=$(resolve_device "${cryptdev}" ${rootdelay}); then
64+
if cryptsetup isLuks ${resolved} >/dev/null 2>&1; then
65+
[ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated
66+
dopassphrase=1
67+
# If keyfile exists, try to use that
68+
if [ -f ${ckeyfile} ]; then
69+
if eval cryptsetup --key-file ${ckeyfile} open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; then
70+
dopassphrase=0
71+
else
72+
echo "Invalid keyfile. Reverting to passphrase."
73+
fi
74+
fi
75+
# Ask for a passphrase
76+
if [ ${dopassphrase} -gt 0 ]; then
77+
echo ""
78+
echo "A password is required to access the ${cryptname} volume:"
79+
80+
#loop until we get a real password
81+
while ! eval cryptsetup open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; do
82+
sleep 2;
83+
done
84+
fi
85+
if [ -e "/dev/mapper/${cryptname}" ]; then
86+
if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
87+
export root="/dev/mapper/root"
88+
fi
89+
else
90+
err "Password succeeded, but ${cryptname} creation failed, aborting..."
91+
exit 1
92+
fi
93+
elif [ -n "${crypto}" ]; then
94+
[ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated
95+
msg "Non-LUKS encrypted device found..."
96+
if echo "$crypto" | awk -F: '{ exit(NF == 5) }'; then
97+
err "Verify parameter format: crypto=hash:cipher:keysize:offset:skip"
98+
err "Non-LUKS decryption not attempted..."
99+
return 1
100+
fi
101+
exe="cryptsetup open --type plain $resolved $cryptname $cryptargs"
102+
IFS=: read c_hash c_cipher c_keysize c_offset c_skip <<EOF
103+
$crypto
104+
EOF
105+
[ -n "$c_hash" ] && exe="$exe --hash '$c_hash'"
106+
[ -n "$c_cipher" ] && exe="$exe --cipher '$c_cipher'"
107+
[ -n "$c_keysize" ] && exe="$exe --key-size '$c_keysize'"
108+
[ -n "$c_offset" ] && exe="$exe --offset '$c_offset'"
109+
[ -n "$c_skip" ] && exe="$exe --skip '$c_skip'"
110+
if [ -f "$ckeyfile" ]; then
111+
exe="$exe --key-file $ckeyfile"
112+
else
113+
exe="$exe --verify-passphrase"
114+
echo ""
115+
echo "A password is required to access the ${cryptname} volume:"
116+
fi
117+
eval "$exe $CSQUIET"
118+
119+
if [ $? -ne 0 ]; then
120+
err "Non-LUKS device decryption failed. verify format: "
121+
err " crypto=hash:cipher:keysize:offset:skip"
122+
exit 1
123+
fi
124+
if [ -e "/dev/mapper/${cryptname}" ]; then
125+
if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
126+
export root="/dev/mapper/root"
127+
fi
128+
else
129+
err "Password succeeded, but ${cryptname} creation failed, aborting..."
130+
exit 1
131+
fi
132+
else
133+
err "Failed to open encryption mapping: The device ${cryptdev} is not a LUKS volume and the crypto= paramater was not specified."
134+
fi
135+
fi
136+
rm -f ${ckeyfile}
137+
}
138+
139+
# vim: set ft=sh ts=4 sw=4 et:

cryptsetup/encrypt_install

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
build() {
4+
local mod
5+
6+
add_module dm-crypt
7+
if [[ $CRYPTO_MODULES ]]; then
8+
for mod in $CRYPTO_MODULES; do
9+
add_module "$mod"
10+
done
11+
else
12+
add_all_modules '/crypto/'
13+
fi
14+
15+
add_binary "cryptsetup"
16+
add_binary "dmsetup"
17+
add_file "/usr/lib/udev/rules.d/10-dm.rules"
18+
add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
19+
add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
20+
add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
21+
22+
add_runscript
23+
}
24+
25+
help() {
26+
cat <<HELPEOF
27+
This hook allows for an encrypted root device. Users should specify the device
28+
to be unlocked using 'cryptdevice=device:dmname' on the kernel command line,
29+
where 'device' is the path to the raw device, and 'dmname' is the name given to
30+
the device after unlocking, and will be available as /dev/mapper/dmname.
31+
32+
For unlocking via keyfile, 'cryptkey=device:fstype:path' should be specified on
33+
the kernel cmdline, where 'device' represents the raw block device where the key
34+
exists, 'fstype' is the filesystem type of 'device' (or auto), and 'path' is
35+
the absolute path of the keyfile within the device.
36+
37+
Without specifying a keyfile, you will be prompted for the password at runtime.
38+
This means you must have a keyboard available to input it, and you may need
39+
the keymap hook as well to ensure that the keyboard is using the layout you
40+
expect.
41+
HELPEOF
42+
}
43+
44+
# vim: set ft=sh ts=4 sw=4 et:

cryptsetup/sd-encrypt

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
3+
build() {
4+
local mod
5+
6+
add_module dm-crypt
7+
if [[ $CRYPTO_MODULES ]]; then
8+
for mod in $CRYPTO_MODULES; do
9+
add_module "$mod"
10+
done
11+
else
12+
add_all_modules '/crypto/'
13+
fi
14+
15+
add_binary "dmsetup"
16+
add_file "/usr/lib/udev/rules.d/10-dm.rules"
17+
add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
18+
add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
19+
add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
20+
21+
add_systemd_unit cryptsetup.target
22+
add_binary /usr/lib/systemd/system-generators/systemd-cryptsetup-generator
23+
add_binary /usr/lib/systemd/systemd-cryptsetup
24+
25+
add_systemd_unit systemd-ask-password-console.path
26+
add_systemd_unit systemd-ask-password-console.service
27+
28+
[[ -f /etc/crypttab.initramfs ]] && add_file /etc/crypttab.initramfs /etc/crypttab
29+
}
30+
31+
help() {
32+
cat <<HELPEOF
33+
This hook allows for an encrypted root device with systemd initramfs.
34+
35+
See the manpage of systemd-cryptsetup-generator(8) for available kernel
36+
command line options. Alternatively, if the file /etc/crypttab.initramfs
37+
exists, it will be added to the initramfs as /etc/crypttab. See the
38+
crypttab(5) manpage for more information on crypttab syntax.
39+
HELPEOF
40+
}
41+
42+
# vim: set ft=sh ts=4 sw=4 et:

kernel-modules-x86_64.sum

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ bd1ad80413136a05ac4d870a29824ce0 Kernel: 3.14.61-1-MANJARO
99
fb64f857b4f8f96d0bb6c37ab047115b Kernel: 4.2.8.4-1-MANJARO
1010
faeb800bfbeb0185ccf608c3f025a87c Kernel: 4.3.6-1-MANJARO
1111
21d9eeb9ac514a873f53391c668198de Kernel: 4.4.2-1-MANJARO
12-
8b5b24e3d65020510432391bb9fa1d7d Kernel: 4.5.0-1-MANJARO
12+
86206005451b5a6dbb674d6fbedee1b7 Kernel: 4.5.0-1-MANJARO

linux43/aufs4.3-20160118.patch.bz2

-138 KB
Binary file not shown.

linux43/aufs4.3-20160219.patch.bz2

139 KB
Binary file not shown.

linux45/PKGBUILD

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ pkgname=('linux45' 'linux45-headers')
1111
_kernelname=-MANJARO
1212
_basekernel=4.5
1313
_basever=45
14-
_aufs=20160215
14+
_aufs=20160219
1515
_bfq=v7r8
16-
_rc=rc4
16+
_rc=rc5
1717
pkgver=${_basekernel}${_rc}
1818
pkgrel=1
1919
arch=('i686' 'x86_64')
@@ -49,17 +49,17 @@ source=(#"https://www.kernel.org/pub/linux/kernel/v4.x/linux-${_basekernel}-${_r
4949
"0004-block-bfq-update-migration-methods-attach-for-4.4-rc5-v7r8.patch"
5050
'nvidia-304xx-mtrr-unknown-symbol.patch'
5151
)
52-
sha256sums=('f3b15e8c7cd22f4c3f6b206d6ef31a755e30f66b731f945fd7e3a766f95d2c71'
52+
sha256sums=('b9e704dde6058171bcd997c61e5b1d501f5cec43b7ea24890be1439874249735'
5353
'093701b40d78f7fe3d0041ea300208de5a7af48ed011bf822142307b024a51ed'
5454
'315182bbd0de5d1c906b7c5b48280b82a9e364ea32e9f6e87f79670c9e70e989'
5555
'd1cecc720df66c70f43bdb86e0169d6b756161c870db8d7d39c32c04dc36ed36'
5656
'6d058de24e029651eef6e7e0133616eddf710aa51dfbba1652026f57a35e42ad'
57-
'7a1fc286b8d2fc7e0b0054a164dddec3845331c1ddd330270a37b2d87643f46a'
58-
'27277cbd49eefe6c3a67915e76ce820086e5460f936eb7660189106097a1a338'
57+
'e88e621e5907b53e9931aca5233b34e410e1e8d87b148bc76a231be9e9681380'
58+
'8c0fb159de4e708fd92af2e258c6d91f26ab9447bab2331fbe0cd73f9c082967'
5959
'ddf7886d1edeb4c4f47d52cf019065a6267b1334a87481fd513562f271ff4304'
60-
'6155ec109528aa04fbd189ca25bc3a9bb2c7621ae1c511a46f9bdf9910d5917f'
61-
'0e085f128e1dd49517405a9ce5690d4569e688285840a83bf81c6fd83a2632e6'
62-
'4b35c0961e2b0010a737af601c85a808381eb94be9d6eb8d692574af69e268fa'
60+
'48782bc6517c68cb44a5691f9347266c352384e49cf88105cbfc6f7427fb9fb2'
61+
'17d115003ac4f6354720492a7b51fb081a48a7bc1ba735fd21a31dce88131d29'
62+
'583265ed033e9f8e910bfa343188702af3fc52b7ff4751be4d51fe52dc6dd6e8'
6363
'1419e6aa021e5cd8686291205a84f0fc018f34bf6a3c46a037090116b6f5d021'
6464
'ab579473760cd7abcd5cdfe7508930d1ed5d533e220861ad40a7ac8bf564ceac'
6565
'461aa0da7de8bda9474797339532304894b55825be34f8c009244da8c00c5b41'

linux45/aufs4-base.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
aufs4.x-rcN base patch
22

33
diff --git a/MAINTAINERS b/MAINTAINERS
4-
index 7f1fa4f..d910255 100644
4+
index cc2f753..9801380 100644
55
--- a/MAINTAINERS
66
+++ b/MAINTAINERS
77
@@ -2075,6 +2075,19 @@ F: include/linux/audit.h

linux45/aufs4-loopback.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ index fb2237c..c3888c5 100644
180180
unsigned lo_blocksize;
181181
void *key_data;
182182
diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c
183-
index 4d7236c..39dfd8e 100644
183+
index 996a313..6085b3c 100644
184184
--- a/fs/aufs/f_op.c
185185
+++ b/fs/aufs/f_op.c
186-
@@ -389,7 +389,7 @@ static ssize_t aufs_splice_read(struct file *file, loff_t *ppos,
186+
@@ -399,7 +399,7 @@ static ssize_t aufs_splice_read(struct file *file, loff_t *ppos,
187187
if (IS_ERR(h_file))
188188
goto out;
189189

linux45/aufs4-mmap.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ index 2ed4319..e3a53f5 100644
150150
obj-y += init-mm.o
151151

152152
diff --git a/mm/filemap.c b/mm/filemap.c
153-
index bc94386..25cdcef 100644
153+
index 23edcce..dea5687 100644
154154
--- a/mm/filemap.c
155155
+++ b/mm/filemap.c
156-
@@ -2209,7 +2209,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
156+
@@ -2210,7 +2210,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
157157
int ret = VM_FAULT_LOCKED;
158158

159159
sb_start_pagefault(inode->i_sb);

0 commit comments

Comments
 (0)