summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarrat2022-06-06 20:38:07 +0200
committerNarrat2022-06-06 20:38:07 +0200
commit0cfd51d0b386e3e57ca5ab0b899195a2785752db (patch)
treeb5d85fac6c43c851f6234185f4c4f13cea4752f6
parent3d553f57e00ee17f02d1146c8ccac62a996e4d23 (diff)
downloadaur-0cfd51d0b386e3e57ca5ab0b899195a2785752db.tar.gz
util-linux: update for loop-aes 3.7x
-rw-r--r--.SRCINFO19
-rwxr-xr-xPKGBUILD17
-rw-r--r--util-linux-2.38.diff (renamed from util-linux-2.37.2.diff)228
3 files changed, 128 insertions, 136 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1c712b4b5123..1a899360882a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = util-linux-aes
pkgdesc = Miscellaneous system utilities for Linux, with loop-AES support
- pkgver = 2.37.2
- pkgrel = 1.1
+ pkgver = 2.38
+ pkgrel = 1
url = https://github.com/karelzak/util-linux
install = util-linux-aes.install
arch = x86_64
@@ -13,9 +13,9 @@ pkgbase = util-linux-aes
makedepends = systemd
makedepends = gtk-doc
options = strip
- source = https://www.kernel.org/pub/linux/utils/util-linux/v2.37/util-linux-2.37.2.tar.xz
- source = https://www.kernel.org/pub/linux/utils/util-linux/v2.37/util-linux-2.37.2.tar.sign
- source = util-linux-2.37.2.diff
+ source = https://www.kernel.org/pub/linux/utils/util-linux/v2.38/util-linux-2.38.tar.xz
+ source = https://www.kernel.org/pub/linux/utils/util-linux/v2.38/util-linux-2.38.tar.sign
+ source = util-linux-2.38.diff
source = util-linux-aes.modules
source = pam-login
source = pam-common
@@ -27,9 +27,9 @@ pkgbase = util-linux-aes
source = rfkill-block_.service
validpgpkeys = B0C64D14301CC6EFAEDF60E4E4B71D5EEC39C284
validpgpkeys = 12D64C3ADCDA0AA427BDACDFF0733C808132F189
- sha256sums = 6a0764c1aae7fb607ef8a6dd2c0f6c47d5e5fd27aa08820abaad9ec14e28e9d9
+ sha256sums = 6d111cbe4d55b336db2f1fbeffbc65b89908704c01136371d32aa9bec373eb64
sha256sums = SKIP
- sha256sums = 41ce470339c84c7c6ab32ba112437e96fd3ff71520fbd555d9fabed951670c2e
+ sha256sums = b1f2bf1145354664fac932b313db9599f55de5ff25c5c6f3c003c76da78ae39c
sha256sums = 560ca858961eb997a216ce6b419d900e84688591abf4584ef30c9323ba06fffd
sha256sums = 99cd77f21ee44a0c5e57b0f3670f711a00496f198fc5704d7e44f5d817c81a0f
sha256sums = 57e057758944f4557762c6def939410c04ca5803cbdd2bfa2153ce47ffe7a4af
@@ -53,12 +53,11 @@ pkgname = util-linux-aes
depends = util-linux-libs-aes
depends = libmagic.so
depends = libncursesw.so
- depends = libreadline.so
optdepends = python: python bindings to libmount
optdepends = words: default dictionary for look
provides = rfkill
provides = hardlink
- provides = util-linux=2.37
+ provides = util-linux=2.38
conflicts = rfkill
conflicts = hardlink
conflicts = util-linux
@@ -80,7 +79,7 @@ pkgname = util-linux-libs-aes
provides = libmount.so
provides = libsmartcols.so
provides = libuuid.so
- provides = util-linux-libs=2.37
+ provides = util-linux-libs=2.38
conflicts = libutil-linux
conflicts = util-linux-libs
replaces = libutil-linux
diff --git a/PKGBUILD b/PKGBUILD
index edace3e9e3d1..ab7ae55cd1f3 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,10 +8,10 @@
_basename=util-linux
pkgbase=util-linux-aes
pkgname=(util-linux-aes util-linux-libs-aes)
-_pkgmajor=2.37
-_realver=${_pkgmajor}.2
+_pkgmajor=2.38
+_realver=${_pkgmajor}
pkgver=${_realver/-/}
-pkgrel=1.1
+pkgrel=1
pkgdesc='Miscellaneous system utilities for Linux, with loop-AES support'
url='https://github.com/karelzak/util-linux'
#url="http://sourceforge.net/projects/loop-aes/"
@@ -30,9 +30,9 @@ source=("https://www.kernel.org/pub/linux/utils/util-linux/v${_pkgmajor}/${_base
'60-rfkill.rules'
'rfkill-unblock_.service'
'rfkill-block_.service')
-sha256sums=('6a0764c1aae7fb607ef8a6dd2c0f6c47d5e5fd27aa08820abaad9ec14e28e9d9'
+sha256sums=('6d111cbe4d55b336db2f1fbeffbc65b89908704c01136371d32aa9bec373eb64'
'SKIP'
- '41ce470339c84c7c6ab32ba112437e96fd3ff71520fbd555d9fabed951670c2e'
+ 'b1f2bf1145354664fac932b313db9599f55de5ff25c5c6f3c003c76da78ae39c'
'560ca858961eb997a216ce6b419d900e84688591abf4584ef30c9323ba06fffd'
'99cd77f21ee44a0c5e57b0f3670f711a00496f198fc5704d7e44f5d817c81a0f'
'57e057758944f4557762c6def939410c04ca5803cbdd2bfa2153ce47ffe7a4af'
@@ -61,7 +61,6 @@ build() {
--localstatedir=/var \
--enable-usrdir-path \
--enable-fs-paths-default=/usr/bin:/usr/local/bin \
- --enable-raw \
--enable-vipw \
--enable-newgrp \
--enable-chfn-chsh \
@@ -74,11 +73,11 @@ build() {
package_util-linux-aes() {
conflicts=('rfkill' 'hardlink' "${_basename}")
- provides=('rfkill' 'hardlink' "${_basename}=2.37")
+ provides=('rfkill' 'hardlink' "${_basename}=2.38")
replaces=('rfkill' 'hardlink')
depends=('pam' 'shadow' 'coreutils' 'systemd-libs' 'libsystemd.so'
'libudev.so' 'libcap-ng' 'libxcrypt' 'libcrypt.so' 'util-linux-libs-aes'
- 'libmagic.so' 'libncursesw.so' 'libreadline.so')
+ 'libmagic.so' 'libncursesw.so')
optdepends=('python: python bindings to libmount'
'words: default dictionary for look')
backup=(etc/pam.d/chfn
@@ -135,7 +134,7 @@ package_util-linux-aes() {
package_util-linux-libs-aes() {
pkgdesc="util-linux runtime libraries"
- provides=('libutil-linux' 'libblkid.so' 'libfdisk.so' 'libmount.so' 'libsmartcols.so' 'libuuid.so' "${_basename}-libs=2.37")
+ provides=('libutil-linux' 'libblkid.so' 'libfdisk.so' 'libmount.so' 'libsmartcols.so' 'libuuid.so' "${_basename}-libs=2.38")
conflicts=('libutil-linux' "${_basename}-libs")
replaces=('libutil-linux')
diff --git a/util-linux-2.37.2.diff b/util-linux-2.38.diff
index 132072248b36..eee48d4cb22c 100644
--- a/util-linux-2.37.2.diff
+++ b/util-linux-2.38.diff
@@ -19,20 +19,20 @@ to programs, like this:
make
-diff -urN util-linux-2.37.2/include/Makemodule.am util-linux-2.37.2-AES/include/Makemodule.am
---- util-linux-2.37.2/include/Makemodule.am 2021-08-16 13:57:48.571807655 +0300
-+++ util-linux-2.37.2-AES/include/Makemodule.am 2021-09-02 07:09:11.369551473 +0300
-@@ -50,6 +50,7 @@
- include/procutils.h \
+diff -urN util-linux-2.38/include/Makemodule.am util-linux-2.38-AES/include/Makemodule.am
+--- util-linux-2.38/include/Makemodule.am 2022-03-25 09:27:30.402407156 +0200
++++ util-linux-2.38-AES/include/Makemodule.am 2022-05-31 00:31:47.991067951 +0300
+@@ -52,6 +52,7 @@
+ include/procfs.h \
include/pt-bsd.h \
include/pt-mbr.h \
+ include/xgetpass.h \
include/pt-mbr-partnames.h \
include/pt-gpt-partnames.h \
include/pt-sgi.h \
-diff -urN util-linux-2.37.2/include/xgetpass.h util-linux-2.37.2-AES/include/xgetpass.h
---- util-linux-2.37.2/include/xgetpass.h 1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-2.37.2-AES/include/xgetpass.h 2021-09-02 07:09:11.370551480 +0300
+diff -urN util-linux-2.38/include/xgetpass.h util-linux-2.38-AES/include/xgetpass.h
+--- util-linux-2.38/include/xgetpass.h 1970-01-01 02:00:00.000000000 +0200
++++ util-linux-2.38-AES/include/xgetpass.h 2022-05-31 00:31:47.991067951 +0300
@@ -0,0 +1,6 @@
+#ifndef UTIL_LINUX_XGETPASS_H
+#define UTIL_LINUX_XGETPASS_H
@@ -40,10 +40,10 @@ diff -urN util-linux-2.37.2/include/xgetpass.h util-linux-2.37.2-AES/include/xge
+extern char *xgetpass(int pfd, const char *prompt);
+
+#endif /* UTIL_LINUX_XGETPASS_H */
-diff -urN util-linux-2.37.2/lib/Makemodule.am util-linux-2.37.2-AES/lib/Makemodule.am
---- util-linux-2.37.2/lib/Makemodule.am 2021-08-16 13:57:48.572807650 +0300
-+++ util-linux-2.37.2-AES/lib/Makemodule.am 2021-09-02 07:09:11.370551480 +0300
-@@ -32,6 +32,7 @@
+diff -urN util-linux-2.38/lib/Makemodule.am util-linux-2.38-AES/lib/Makemodule.am
+--- util-linux-2.38/lib/Makemodule.am 2022-03-25 09:27:30.403407149 +0200
++++ util-linux-2.38-AES/lib/Makemodule.am 2022-05-31 00:31:47.992067959 +0300
+@@ -33,6 +33,7 @@
lib/pwdutils.c \
lib/randutils.c \
lib/sha1.c \
@@ -51,9 +51,9 @@ diff -urN util-linux-2.37.2/lib/Makemodule.am util-linux-2.37.2-AES/lib/Makemodu
lib/signames.c \
lib/strutils.c \
lib/strv.c \
-diff -urN util-linux-2.37.2/lib/xgetpass.c util-linux-2.37.2-AES/lib/xgetpass.c
---- util-linux-2.37.2/lib/xgetpass.c 1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-2.37.2-AES/lib/xgetpass.c 2021-09-02 07:09:11.370551480 +0300
+diff -urN util-linux-2.38/lib/xgetpass.c util-linux-2.38-AES/lib/xgetpass.c
+--- util-linux-2.38/lib/xgetpass.c 1970-01-01 02:00:00.000000000 +0200
++++ util-linux-2.38-AES/lib/xgetpass.c 2022-05-31 00:31:47.992067959 +0300
@@ -0,0 +1,64 @@
+/*
+ * A function to read the passphrase either from the terminal or from
@@ -119,9 +119,9 @@ diff -urN util-linux-2.37.2/lib/xgetpass.c util-linux-2.37.2-AES/lib/xgetpass.c
+ if(p) p[y] = 0;
+ return p;
+}
-diff -urN util-linux-2.37.2/libmount/src/Makemodule.am util-linux-2.37.2-AES/libmount/src/Makemodule.am
---- util-linux-2.37.2/libmount/src/Makemodule.am 2021-05-31 18:31:47.951009645 +0300
-+++ util-linux-2.37.2-AES/libmount/src/Makemodule.am 2021-09-02 07:09:11.371551488 +0300
+diff -urN util-linux-2.38/libmount/src/Makemodule.am util-linux-2.38-AES/libmount/src/Makemodule.am
+--- util-linux-2.38/libmount/src/Makemodule.am 2022-01-06 15:52:17.854125684 +0200
++++ util-linux-2.38-AES/libmount/src/Makemodule.am 2022-05-31 00:31:47.992067959 +0300
@@ -27,7 +27,10 @@
if LINUX
libmount_la_SOURCES += \
@@ -134,9 +134,9 @@ diff -urN util-linux-2.37.2/libmount/src/Makemodule.am util-linux-2.37.2-AES/lib
libmount/src/context_veritydev.c \
libmount/src/context_mount.c \
libmount/src/context_umount.c \
-diff -urN util-linux-2.37.2/libmount/src/aes.c util-linux-2.37.2-AES/libmount/src/aes.c
---- util-linux-2.37.2/libmount/src/aes.c 1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-2.37.2-AES/libmount/src/aes.c 2021-09-02 07:09:11.371551488 +0300
+diff -urN util-linux-2.38/libmount/src/aes.c util-linux-2.38-AES/libmount/src/aes.c
+--- util-linux-2.38/libmount/src/aes.c 1970-01-01 02:00:00.000000000 +0200
++++ util-linux-2.38-AES/libmount/src/aes.c 2022-05-31 00:31:47.993067968 +0300
@@ -0,0 +1,299 @@
+// I retain copyright in this code but I encourage its free use provided
+// that I don't carry any responsibility for the results. I am especially
@@ -437,9 +437,9 @@ diff -urN util-linux-2.37.2/libmount/src/aes.c util-linux-2.37.2-AES/libmount/sr
+
+ state_out(out_blk, b0);
+}
-diff -urN util-linux-2.37.2/libmount/src/aes.h util-linux-2.37.2-AES/libmount/src/aes.h
---- util-linux-2.37.2/libmount/src/aes.h 1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-2.37.2-AES/libmount/src/aes.h 2021-09-02 07:09:11.372551495 +0300
+diff -urN util-linux-2.38/libmount/src/aes.h util-linux-2.38-AES/libmount/src/aes.h
+--- util-linux-2.38/libmount/src/aes.h 1970-01-01 02:00:00.000000000 +0200
++++ util-linux-2.38-AES/libmount/src/aes.h 2022-05-31 00:31:47.993067968 +0300
@@ -0,0 +1,97 @@
+// I retain copyright in this code but I encourage its free use provided
+// that I don't carry any responsibility for the results. I am especially
@@ -538,9 +538,9 @@ diff -urN util-linux-2.37.2/libmount/src/aes.h util-linux-2.37.2-AES/libmount/sr
+// if their parameters have not changed.
+
+#endif // _AES_H
-diff -urN util-linux-2.37.2/libmount/src/context.c util-linux-2.37.2-AES/libmount/src/context.c
---- util-linux-2.37.2/libmount/src/context.c 2021-08-16 13:57:48.580807607 +0300
-+++ util-linux-2.37.2-AES/libmount/src/context.c 2021-09-02 07:09:11.373551503 +0300
+diff -urN util-linux-2.38/libmount/src/context.c util-linux-2.38-AES/libmount/src/context.c
+--- util-linux-2.38/libmount/src/context.c 2022-02-17 12:28:41.067689783 +0200
++++ util-linux-2.38-AES/libmount/src/context.c 2022-05-31 00:31:47.994067977 +0300
@@ -102,7 +102,6 @@
mnt_unref_fs(cxt->fs);
mnt_unref_fs(cxt->fs_template);
@@ -558,9 +558,9 @@ diff -urN util-linux-2.37.2/libmount/src/context.c util-linux-2.37.2-AES/libmoun
fl = cxt->flags;
mnt_unref_fs(cxt->fs);
-diff -urN util-linux-2.37.2/libmount/src/context_loopdev1.c util-linux-2.37.2-AES/libmount/src/context_loopdev1.c
---- util-linux-2.37.2/libmount/src/context_loopdev1.c 1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-2.37.2-AES/libmount/src/context_loopdev1.c 2021-09-02 07:09:11.374551510 +0300
+diff -urN util-linux-2.38/libmount/src/context_loopdev1.c util-linux-2.38-AES/libmount/src/context_loopdev1.c
+--- util-linux-2.38/libmount/src/context_loopdev1.c 1970-01-01 02:00:00.000000000 +0200
++++ util-linux-2.38-AES/libmount/src/context_loopdev1.c 2022-05-31 00:31:47.994067977 +0300
@@ -0,0 +1,1525 @@
+/*
+ * Copyright (C) 2011 Karel Zak <kzak@redhat.com>
@@ -1590,7 +1590,7 @@ diff -urN util-linux-2.37.2/libmount/src/context_loopdev1.c util-linux-2.37.2-AE
+ */
+ type = mnt_fs_get_fstype(cxt->fs);
+
-+ if (mnt_fs_is_regular(cxt->fs) &&
++ if (mnt_fs_is_regularfs(cxt->fs) &&
+ (!type || strcmp(type, "auto") == 0 || blkid_known_fstype(type))) {
+ struct stat st;
+
@@ -2087,10 +2087,10 @@ diff -urN util-linux-2.37.2/libmount/src/context_loopdev1.c util-linux-2.37.2-AE
+ cxt->loopdev_fd = -1;
+ return 0;
+}
-diff -urN util-linux-2.37.2/libmount/src/context_umount.c util-linux-2.37.2-AES/libmount/src/context_umount.c
---- util-linux-2.37.2/libmount/src/context_umount.c 2021-07-20 12:31:43.451321659 +0300
-+++ util-linux-2.37.2-AES/libmount/src/context_umount.c 2021-09-02 07:09:11.374551510 +0300
-@@ -390,11 +390,12 @@
+diff -urN util-linux-2.38/libmount/src/context_umount.c util-linux-2.38-AES/libmount/src/context_umount.c
+--- util-linux-2.38/libmount/src/context_umount.c 2022-02-17 12:28:41.067689783 +0200
++++ util-linux-2.38-AES/libmount/src/context_umount.c 2022-05-31 00:31:47.994067977 +0300
+@@ -389,11 +389,12 @@
*/
static int is_associated_fs(const char *devname, struct libmnt_fs *fs)
{
@@ -2105,7 +2105,7 @@ diff -urN util-linux-2.37.2/libmount/src/context_umount.c util-linux-2.37.2-AES/
/* check if it begins with /dev/loop */
if (strncmp(devname, _PATH_DEV_LOOP, sizeof(_PATH_DEV_LOOP) - 1) != 0)
-@@ -406,16 +407,16 @@
+@@ -405,16 +406,16 @@
/* check for the offset option in @fs */
optstr = mnt_fs_get_user_options(fs);
@@ -2132,7 +2132,7 @@ diff -urN util-linux-2.37.2/libmount/src/context_umount.c util-linux-2.37.2-AES/
}
static int prepare_helper_from_options(struct libmnt_context *cxt,
-@@ -978,7 +979,7 @@
+@@ -969,7 +970,7 @@
if (!rc && mnt_context_is_loopdel(cxt) && cxt->fs) {
const char *src = mnt_fs_get_srcpath(cxt->fs);
@@ -2141,9 +2141,9 @@ diff -urN util-linux-2.37.2/libmount/src/context_umount.c util-linux-2.37.2-AES/
mnt_context_enable_loopdel(cxt, FALSE);
}
-diff -urN util-linux-2.37.2/libmount/src/optmap.c util-linux-2.37.2-AES/libmount/src/optmap.c
---- util-linux-2.37.2/libmount/src/optmap.c 2021-08-16 13:57:48.582807597 +0300
-+++ util-linux-2.37.2-AES/libmount/src/optmap.c 2021-09-02 07:09:11.374551510 +0300
+diff -urN util-linux-2.38/libmount/src/optmap.c util-linux-2.38-AES/libmount/src/optmap.c
+--- util-linux-2.38/libmount/src/optmap.c 2022-02-17 12:28:41.068689778 +0200
++++ util-linux-2.38-AES/libmount/src/optmap.c 2022-05-31 00:31:47.994067977 +0300
@@ -172,10 +172,19 @@
{ "x-", MNT_MS_XCOMMENT, MNT_NOHLPS | MNT_PREFIX }, /* persistent comments (utab) */
{ "X-", MNT_MS_XFSTABCOMM, MNT_NOHLPS | MNT_NOMTAB | MNT_PREFIX }, /* fstab only comments */
@@ -2166,9 +2166,9 @@ diff -urN util-linux-2.37.2/libmount/src/optmap.c util-linux-2.37.2-AES/libmount
{ "nofail", MNT_MS_NOFAIL, MNT_NOMTAB }, /* Do not fail if ENOENT on dev */
-diff -urN util-linux-2.37.2/libmount/src/rmd160.c util-linux-2.37.2-AES/libmount/src/rmd160.c
---- util-linux-2.37.2/libmount/src/rmd160.c 1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-2.37.2-AES/libmount/src/rmd160.c 2021-09-02 07:09:11.374551510 +0300
+diff -urN util-linux-2.38/libmount/src/rmd160.c util-linux-2.38-AES/libmount/src/rmd160.c
+--- util-linux-2.38/libmount/src/rmd160.c 1970-01-01 02:00:00.000000000 +0200
++++ util-linux-2.38-AES/libmount/src/rmd160.c 2022-05-31 00:31:47.995067986 +0300
@@ -0,0 +1,532 @@
+/* rmd160.c - RIPE-MD160
+ * Copyright (C) 1998 Free Software Foundation, Inc.
@@ -2702,9 +2702,9 @@ diff -urN util-linux-2.37.2/libmount/src/rmd160.c util-linux-2.37.2-AES/libmount
+ rmd160_final( &hd );
+ memcpy( outbuf, hd.buf, 20 );
+}
-diff -urN util-linux-2.37.2/libmount/src/rmd160.h util-linux-2.37.2-AES/libmount/src/rmd160.h
---- util-linux-2.37.2/libmount/src/rmd160.h 1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-2.37.2-AES/libmount/src/rmd160.h 2021-09-02 07:09:11.374551510 +0300
+diff -urN util-linux-2.38/libmount/src/rmd160.h util-linux-2.38-AES/libmount/src/rmd160.h
+--- util-linux-2.38/libmount/src/rmd160.h 1970-01-01 02:00:00.000000000 +0200
++++ util-linux-2.38-AES/libmount/src/rmd160.h 2022-05-31 00:31:47.995067986 +0300
@@ -0,0 +1,9 @@
+#ifndef RMD160_H
+#define RMD160_H
@@ -2715,9 +2715,9 @@ diff -urN util-linux-2.37.2/libmount/src/rmd160.h util-linux-2.37.2-AES/libmount
+#endif /*RMD160_H*/
+
+
-diff -urN util-linux-2.37.2/libmount/src/sha512.c util-linux-2.37.2-AES/libmount/src/sha512.c
---- util-linux-2.37.2/libmount/src/sha512.c 1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-2.37.2-AES/libmount/src/sha512.c 2021-09-02 07:09:11.374551510 +0300
+diff -urN util-linux-2.38/libmount/src/sha512.c util-linux-2.38-AES/libmount/src/sha512.c
+--- util-linux-2.38/libmount/src/sha512.c 1970-01-01 02:00:00.000000000 +0200
++++ util-linux-2.38-AES/libmount/src/sha512.c 2022-05-31 00:31:47.995067986 +0300
@@ -0,0 +1,432 @@
+/*
+ * sha512.c
@@ -3151,9 +3151,9 @@ diff -urN util-linux-2.37.2/libmount/src/sha512.c util-linux-2.37.2-AES/libmount
+ memset(&ctx, 0, sizeof(ctx));
+}
+#endif
-diff -urN util-linux-2.37.2/libmount/src/sha512.h util-linux-2.37.2-AES/libmount/src/sha512.h
---- util-linux-2.37.2/libmount/src/sha512.h 1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-2.37.2-AES/libmount/src/sha512.h 2021-09-02 07:09:11.374551510 +0300
+diff -urN util-linux-2.38/libmount/src/sha512.h util-linux-2.38-AES/libmount/src/sha512.h
+--- util-linux-2.38/libmount/src/sha512.h 1970-01-01 02:00:00.000000000 +0200
++++ util-linux-2.38-AES/libmount/src/sha512.h 2022-05-31 00:31:47.995067986 +0300
@@ -0,0 +1,45 @@
+/*
+ * sha512.h
@@ -3200,9 +3200,9 @@ diff -urN util-linux-2.37.2/libmount/src/sha512.h util-linux-2.37.2-AES/libmount
+/* no sha384_write(), use sha512_write() */
+/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */
+extern void __loDev_sha384_hash_buffer(unsigned char *, int, unsigned char *, int);
-diff -urN util-linux-2.37.2/sys-utils/Makemodule.am util-linux-2.37.2-AES/sys-utils/Makemodule.am
---- util-linux-2.37.2/sys-utils/Makemodule.am 2021-07-20 12:34:53.356456837 +0300
-+++ util-linux-2.37.2-AES/sys-utils/Makemodule.am 2021-09-02 07:09:11.375551518 +0300
+diff -urN util-linux-2.38/sys-utils/Makemodule.am util-linux-2.38-AES/sys-utils/Makemodule.am
+--- util-linux-2.38/sys-utils/Makemodule.am 2022-01-25 10:50:55.647020553 +0200
++++ util-linux-2.38-AES/sys-utils/Makemodule.am 2022-05-31 00:31:47.995067986 +0300
@@ -292,7 +292,7 @@
sbin_PROGRAMS += losetup
MANPAGES += sys-utils/losetup.8
@@ -3229,9 +3229,9 @@ diff -urN util-linux-2.37.2/sys-utils/Makemodule.am util-linux-2.37.2-AES/sys-ut
sys-utils/swapon-common.c \
sys-utils/swapon-common.h \
lib/swapprober.c \
-diff -urN util-linux-2.37.2/sys-utils/loop.c util-linux-2.37.2-AES/sys-utils/loop.c
---- util-linux-2.37.2/sys-utils/loop.c 1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-2.37.2-AES/sys-utils/loop.c 2021-09-02 07:09:11.375551518 +0300
+diff -urN util-linux-2.38/sys-utils/loop.c util-linux-2.38-AES/sys-utils/loop.c
+--- util-linux-2.38/sys-utils/loop.c 1970-01-01 02:00:00.000000000 +0200
++++ util-linux-2.38-AES/sys-utils/loop.c 2022-05-31 00:31:47.995067986 +0300
@@ -0,0 +1,221 @@
+/*
+ * loop.c
@@ -3454,9 +3454,9 @@ diff -urN util-linux-2.37.2/sys-utils/loop.c util-linux-2.37.2-AES/sys-utils/loo
+ loopinfo->lo_encrypt_type = 18; /* LO_CRYPT_CRYPTOAPI */
+ return(loop_set_status64_ioctl(fd, loopinfo));
+}
-diff -urN util-linux-2.37.2/sys-utils/loop.h util-linux-2.37.2-AES/sys-utils/loop.h
---- util-linux-2.37.2/sys-utils/loop.h 1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-2.37.2-AES/sys-utils/loop.h 2021-09-02 07:09:11.375551518 +0300
+diff -urN util-linux-2.38/sys-utils/loop.h util-linux-2.38-AES/sys-utils/loop.h
+--- util-linux-2.38/sys-utils/loop.h 1970-01-01 02:00:00.000000000 +0200
++++ util-linux-2.38-AES/sys-utils/loop.h 2022-05-31 00:31:47.995067986 +0300
@@ -0,0 +1,87 @@
+/*
+ * loop.h
@@ -3545,10 +3545,10 @@ diff -urN util-linux-2.37.2/sys-utils/loop.h util-linux-2.37.2-AES/sys-utils/loo
+extern int try_cryptoapi_loop_interface(int, struct loop_info64 *, char *);
+
+#endif
-diff -urN util-linux-2.37.2/sys-utils/losetup.8.adoc util-linux-2.37.2-AES/sys-utils/losetup.8.adoc
---- util-linux-2.37.2/sys-utils/losetup.8.adoc 2021-06-02 12:46:28.258787794 +0300
-+++ util-linux-2.37.2-AES/sys-utils/losetup.8.adoc 2021-09-02 09:17:45.814927884 +0300
-@@ -12,159 +12,135 @@
+diff -urN util-linux-2.38/sys-utils/losetup.8.adoc util-linux-2.38-AES/sys-utils/losetup.8.adoc
+--- util-linux-2.38/sys-utils/losetup.8.adoc 2022-03-09 12:30:22.957702940 +0200
++++ util-linux-2.38-AES/sys-utils/losetup.8.adoc 2022-05-31 00:31:47.995067986 +0300
+@@ -12,153 +12,135 @@
== SYNOPSIS
@@ -3575,7 +3575,7 @@ diff -urN util-linux-2.37.2/sys-utils/losetup.8.adoc util-linux-2.37.2-AES/sys-u
-
-Set up a loop device:
-
--*losetup* [*-o* _offset_] [*--sizelimit* _size_] [*--sector-size* _size_] [*-Pr*] [*--show*] *-f* _loopdev file_
+-*losetup* [*-o* _offset_] [*--sizelimit* _size_] [*--sector-size* _size_] [*-Pr*] [*--show*] *-f*|_loopdev file_
-
-Resize a loop device:
-
@@ -3590,7 +3590,7 @@ diff -urN util-linux-2.37.2/sys-utils/losetup.8.adoc util-linux-2.37.2-AES/sys-u
-
-It's possible to create more independent loop devices for the same backing file. *This setup may be dangerous, can cause data loss, corruption and overwrites.* Use *--nooverlap* with *--find* during setup to avoid this problem.
-
--The loop device setup is not an atomic operation when used with *--find*, and *losetup* does not protect this operation by any lock. The number of attempts is internally restricted to a maximum of 16. It is recommended to use for example flock1 to avoid a collision in heavily parallel use cases.
+-The loop device setup is not an atomic operation when used with *--find*, and *losetup* does not protect this operation by any lock. The number of attempts is internally restricted to a maximum of 16. It is recommended to use for example *flock*(1) to avoid a collision in heavily parallel use cases.
+*losetup* is used to associate loop devices with regular files or block devices, to detach loop devices and to query the status of a loop device. If only the loop_device argument is given, the status of the corresponding loop device is shown.
== OPTIONS
@@ -3598,7 +3598,7 @@ diff -urN util-linux-2.37.2/sys-utils/losetup.8.adoc util-linux-2.37.2-AES/sys-u
-The _size_ and _offset_ arguments may be followed by the multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB") or the suffixes KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
-
-*-a*, *--all*::
--Show the status of all loop devices. Note that not all information is accessible for non-root users. See also *--list*. The old output format (as printed without *--list)* is deprecated.
+-Show the status of all loop devices. Note that not all information is accessible for non-root users. See also *--list*. The old output format (as printed without *--list*) is deprecated.
-
-*-d*, *--detach* _loopdev_...::
-Detach the file or device associated with the specified loop device(s). Note that since Linux v3.7 kernel uses "lazy device destruction". The detach operation does not return *EBUSY* error anymore if device is actively used by system, but it is marked by autoclear flag and destroyed later.
@@ -3620,24 +3620,21 @@ diff -urN util-linux-2.37.2/sys-utils/losetup.8.adoc util-linux-2.37.2-AES/sys-u
-
-*-o*, *--offset* _offset_::
-The data start is moved _offset_ bytes into the specified file or device. The _offset_ may be followed by the multiplicative suffixes; see above.
--
--*--sizelimit* _size_::
--The data end is set to no more than _size_ bytes after the data start. The _size_ may be followed by the multiplicative suffixes; see above.
+*-a*::
+Show status of all loop devices.
--*-b*, *--sector-size* _size_::
--Set the logical sector size of the loop device in bytes (since Linux 4.14). The option may be used when create a new loop device as well as stand-alone command to modify sector size of the already existing loop device.
+-*--sizelimit* _size_::
+-The data end is set to no more than _size_ bytes after the data start. The _size_ may be followed by the multiplicative suffixes; see above.
+*-C* itercountk::
+Runs hashed passphrase through itercountk thousand iterations of AES-256 before using it for loop encryption. This consumes lots of CPU cycles at loop setup/mount time but not thereafter. In combination with passphrase seed this slows down dictionary attacks. Iteration is not done in multi-key mode.
--*-c*, *--set-capacity* _loopdev_::
--Force the loop driver to reread the size of the file associated with the specified loop device.
+-*-b*, *--sector-size* _size_::
+-Set the logical sector size of the loop device in bytes (since Linux 4.14). The option may be used when create a new loop device as well as stand-alone command to modify sector size of the already existing loop device.
+*-d*::
+Detach the file or device associated with the specified loop device.
--*-P*, *--partscan*::
--Force the kernel to scan the partition table on a newly created loop device. Note that the partition table parsing depends on sector sizes. The default is sector size is 512 bytes, otherwise you need to use the option *--sector-size* together with *--partscan*.
+-*-c*, *--set-capacity* _loopdev_::
+-Force the loop driver to reread the size of the file associated with the specified loop device.
+*-e* encryption::
+Enable data encryption. Following encryption types are recognized:
++
@@ -3703,16 +3700,19 @@ diff -urN util-linux-2.37.2/sys-utils/losetup.8.adoc util-linux-2.37.2-AES/sys-u
+*-s* sizelimit::
+Size of loop device is limited to sizelimit bytes. If unspecified or set to zero, loop device size is set to maximum available (file size minus offset). This option may not be supported on some older kernels and/or loop drivers.
--*-r*, *--read-only*::
--Set up a read-only loop device.
+-*-P*, *--partscan*::
+-Force the kernel to scan the partition table on a newly created loop device. Note that the partition table parsing depends on sector sizes. The default is sector size is 512 bytes, otherwise you need to use the option *--sector-size* together with *--partscan*.
+*-S* pseed::
+Sets encryption passphrase seed pseed which is appended to user supplied passphrase before hashing. Using different seeds for different partitions makes dictionary attacks slower but does not prevent them if user supplied passphrase is guessable. Seed is not used in multi-key mode.
--*--direct-io*[**=on**|*off*]::
--Enable or disable direct I/O for the backing file. The optional argument can be either *on* or *off*. If the argument is omitted, it defaults to *off*.
+-*-r*, *--read-only*::
+-Set up a read-only loop device.
+*-T*::
+Asks passphrase twice.
+-*--direct-io*[**=on**|*off*]::
+-Enable or disable direct I/O for the backing file. The optional argument can be either *on* or *off*. If the optional argument is omitted, it defaults to *on*.
+-
-*-v*, *--verbose*::
+*-v*::
Verbose mode.
@@ -3735,12 +3735,6 @@ diff -urN util-linux-2.37.2/sys-utils/losetup.8.adoc util-linux-2.37.2-AES/sys-u
-*-J*, *--json*::
-Use JSON format for *--list* output.
-
--*-V*, *--version*::
--Display version information and exit.
--
--*-h*, *--help*::
--Display help text and exit.
--
-== ENCRYPTION
-
-*Cryptoloop is no longer supported in favor of dm-crypt.* For more details see *cryptsetup*(8).
@@ -3755,7 +3749,7 @@ diff -urN util-linux-2.37.2/sys-utils/losetup.8.adoc util-linux-2.37.2-AES/sys-u
-
-== ENVIRONMENT
-
--LOOPDEV_DEBUG=all::
+-*LOOPDEV_DEBUG*=all::
-enables debug output.
+*losetup* returns 0 on success, nonzero on failure. When *losetup* displays the status of a loop device, it returns 1 if the device is not configured and 2 if an error occurred which prevented *losetup* from determining the status of the device.
@@ -3807,9 +3801,9 @@ diff -urN util-linux-2.37.2/sys-utils/losetup.8.adoc util-linux-2.37.2-AES/sys-u
-include::man-common/translation.adoc[]
-endif::[]
+AES support: Jari Ruusu
-diff -urN util-linux-2.37.2/sys-utils/losetup1.c util-linux-2.37.2-AES/sys-utils/losetup1.c
---- util-linux-2.37.2/sys-utils/losetup1.c 1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-2.37.2-AES/sys-utils/losetup1.c 2021-09-02 07:09:11.376551526 +0300
+diff -urN util-linux-2.38/sys-utils/losetup1.c util-linux-2.38-AES/sys-utils/losetup1.c
+--- util-linux-2.38/sys-utils/losetup1.c 1970-01-01 02:00:00.000000000 +0200
++++ util-linux-2.38-AES/sys-utils/losetup1.c 2022-05-31 00:31:47.996067994 +0300
@@ -0,0 +1,1281 @@
+/* Taken from Ted's losetup.c - Mitch <m.dsouza@mrc-apu.cam.ac.uk> */
+/* Added vfs mount options - aeb - 960223 */
@@ -5092,10 +5086,10 @@ diff -urN util-linux-2.37.2/sys-utils/losetup1.c util-linux-2.37.2-AES/sys-utils
+ }
+ return res;
+}
-diff -urN util-linux-2.37.2/sys-utils/mount.8.adoc util-linux-2.37.2-AES/sys-utils/mount.8.adoc
---- util-linux-2.37.2/sys-utils/mount.8.adoc 2021-08-16 14:00:18.083019067 +0300
-+++ util-linux-2.37.2-AES/sys-utils/mount.8.adoc 2021-09-02 07:09:11.376551526 +0300
-@@ -374,6 +374,9 @@
+diff -urN util-linux-2.38/sys-utils/mount.8.adoc util-linux-2.38-AES/sys-utils/mount.8.adoc
+--- util-linux-2.38/sys-utils/mount.8.adoc 2022-02-17 12:28:41.196689052 +0200
++++ util-linux-2.38-AES/sys-utils/mount.8.adoc 2022-05-31 00:31:47.996067994 +0300
+@@ -381,6 +381,9 @@
*--options-source-force*::
Use options from _fstab_/_mtab_ even if both _device_ and _dir_ are specified.
@@ -5105,7 +5099,7 @@ diff -urN util-linux-2.37.2/sys-utils/mount.8.adoc util-linux-2.37.2-AES/sys-uti
*-R*, *--rbind*::
Remount a subtree and all possible submounts somewhere else (so that its contents are available in both places). See above, the subsection *Bind mounts*.
-@@ -1445,7 +1448,9 @@
+@@ -1454,7 +1457,9 @@
*mount -t ext4 /tmp/disk.img /mnt*
____
@@ -5116,9 +5110,9 @@ diff -urN util-linux-2.37.2/sys-utils/mount.8.adoc util-linux-2.37.2-AES/sys-uti
Since Linux 2.6.25 auto-destruction of loop devices is supported, meaning that any loop device allocated by *mount* will be freed by *umount* independently of _/etc/mtab_.
-diff -urN util-linux-2.37.2/sys-utils/mount.c util-linux-2.37.2-AES/sys-utils/mount.c
---- util-linux-2.37.2/sys-utils/mount.c 2021-08-16 13:57:48.681807074 +0300
-+++ util-linux-2.37.2-AES/sys-utils/mount.c 2021-09-02 07:09:11.376551526 +0300
+diff -urN util-linux-2.38/sys-utils/mount.c util-linux-2.38-AES/sys-utils/mount.c
+--- util-linux-2.38/sys-utils/mount.c 2022-02-17 12:28:41.196689052 +0200
++++ util-linux-2.38-AES/sys-utils/mount.c 2022-05-31 00:31:47.996067994 +0300
@@ -36,6 +36,7 @@
#include "c.h"
#include "env.h"
@@ -5126,8 +5120,8 @@ diff -urN util-linux-2.37.2/sys-utils/mount.c util-linux-2.37.2-AES/sys-utils/mo
+#include "xgetpass.h"
#include "closestream.h"
#include "canonicalize.h"
-
-@@ -47,6 +48,7 @@
+ #include "pathnames.h"
+@@ -48,6 +49,7 @@
static struct ul_env_list *envs_removed;
@@ -5135,7 +5129,7 @@ diff -urN util-linux-2.37.2/sys-utils/mount.c util-linux-2.37.2-AES/sys-utils/mo
static int mk_exit_code(struct libmnt_context *cxt, int rc);
static void suid_drop(struct libmnt_context *cxt)
-@@ -100,6 +102,32 @@
+@@ -101,6 +103,32 @@
return 1;
}
@@ -5168,7 +5162,7 @@ diff -urN util-linux-2.37.2/sys-utils/mount.c util-linux-2.37.2-AES/sys-utils/mo
/*
* Replace control chars with '?' to be compatible with coreutils. For more
* robust solution use findmnt(1) where we use \x?? hex encoding.
-@@ -472,6 +500,7 @@
+@@ -515,6 +543,7 @@
fprintf(out, _(
" -o, --options <list> comma-separated list of mount options\n"
" -O, --test-opts <list> limit the set of filesystems (use with -a)\n"
@@ -5176,16 +5170,16 @@ diff -urN util-linux-2.37.2/sys-utils/mount.c util-linux-2.37.2-AES/sys-utils/mo
" -r, --read-only mount the filesystem read-only (same as -o ro)\n"
" -t, --types <list> limit the set of filesystem types\n"));
fprintf(out, _(
-@@ -671,7 +700,7 @@
+@@ -715,7 +744,7 @@
mnt_context_set_tables_errcb(cxt, table_parser_errcb);
-- while ((c = getopt_long(argc, argv, "aBcfFhilL:Mno:O:rRsU:vVwt:T:N:",
-+ while ((c = getopt_long(argc, argv, "aBcfFhilL:Mno:O:p:rRsU:vVwt:T:N:",
+- while ((c = getopt_long(argc, argv, "aBcfFhilL:m::Mno:O:rRsU:vVwt:T:N:",
++ while ((c = getopt_long(argc, argv, "aBcfFhilL:m::Mno:O:p:rRsU:vVwt:T:N:",
longopts, NULL)) != -1) {
/* only few options are allowed for non-root users */
-@@ -731,6 +760,10 @@
+@@ -775,6 +804,10 @@
if (mnt_context_set_options_pattern(cxt, optarg))
err(MNT_EX_SYSERR, _("failed to set options pattern"));
break;
@@ -5196,7 +5190,7 @@ diff -urN util-linux-2.37.2/sys-utils/mount.c util-linux-2.37.2-AES/sys-utils/mo
case 'L':
xasprintf(&srcbuf, "LABEL=\"%s\"", optarg);
mnt_context_disable_swapmatch(cxt, 1);
-@@ -903,6 +936,8 @@
+@@ -952,6 +985,8 @@
else if (types)
mnt_context_set_fstype(cxt, types);
@@ -5205,9 +5199,9 @@ diff -urN util-linux-2.37.2/sys-utils/mount.c util-linux-2.37.2-AES/sys-utils/mo
if (all) {
/*
* A) Mount all
-diff -urN util-linux-2.37.2/sys-utils/swapoff.c util-linux-2.37.2-AES/sys-utils/swapoff.c
---- util-linux-2.37.2/sys-utils/swapoff.c 2021-05-06 13:55:47.035422724 +0300
-+++ util-linux-2.37.2-AES/sys-utils/swapoff.c 2021-09-02 07:09:11.376551526 +0300
+diff -urN util-linux-2.38/sys-utils/swapoff.c util-linux-2.38-AES/sys-utils/swapoff.c
+--- util-linux-2.38/sys-utils/swapoff.c 2021-05-06 13:55:47.035422724 +0300
++++ util-linux-2.38-AES/sys-utils/swapoff.c 2022-05-31 00:31:47.996067994 +0300
@@ -1,4 +1,9 @@
#include <stdio.h>
+#include <sys/types.h>
@@ -5305,9 +5299,9 @@ diff -urN util-linux-2.37.2/sys-utils/swapoff.c util-linux-2.37.2-AES/sys-utils/
}
mnt_free_iter(itr);
-diff -urN util-linux-2.37.2/sys-utils/swapon.8.adoc util-linux-2.37.2-AES/sys-utils/swapon.8.adoc
---- util-linux-2.37.2/sys-utils/swapon.8.adoc 2021-06-02 12:46:28.260787782 +0300
-+++ util-linux-2.37.2-AES/sys-utils/swapon.8.adoc 2021-09-02 07:09:11.376551526 +0300
+diff -urN util-linux-2.38/sys-utils/swapon.8.adoc util-linux-2.38-AES/sys-utils/swapon.8.adoc
+--- util-linux-2.38/sys-utils/swapon.8.adoc 2022-02-17 12:28:41.198689042 +0200
++++ util-linux-2.38-AES/sys-utils/swapon.8.adoc 2022-05-31 00:31:47.996067994 +0300
@@ -26,6 +26,8 @@
*swapoff* disables swapping on the specified devices and files. When the *-a* flag is given, swapping is disabled on all known swap devices and files (as found in _/proc/swaps_ or _/etc/fstab_).
@@ -5317,9 +5311,9 @@ diff -urN util-linux-2.37.2/sys-utils/swapon.8.adoc util-linux-2.37.2-AES/sys-ut
== OPTIONS
*-a*, *--all*::
-diff -urN util-linux-2.37.2/sys-utils/swapon.c util-linux-2.37.2-AES/sys-utils/swapon.c
---- util-linux-2.37.2/sys-utils/swapon.c 2021-07-20 12:49:57.272329687 +0300
-+++ util-linux-2.37.2-AES/sys-utils/swapon.c 2021-09-02 07:09:11.377551533 +0300
+diff -urN util-linux-2.38/sys-utils/swapon.c util-linux-2.38-AES/sys-utils/swapon.c
+--- util-linux-2.38/sys-utils/swapon.c 2022-02-17 12:28:41.198689042 +0200
++++ util-linux-2.38-AES/sys-utils/swapon.c 2022-05-31 00:31:47.996067994 +0300
@@ -8,6 +8,8 @@
#include <unistd.h>
#include <sys/types.h>