Index: Makefile
===================================================================
--- Makefile (nonexistent)
+++ Makefile (revision 334)
@@ -0,0 +1,303 @@
+
+COMPONENT_TARGETS = $(HARDWARE_INTEL_PC32)
+COMPONENT_TARGETS += $(HARDWARE_INTEL_PC64)
+COMPONENT_TARGETS += $(HARDWARE_EBOX_3350DX2)
+COMPONENT_TARGETS += $(HARDWARE_CB1X)
+COMPONENT_TARGETS += $(HARDWARE_CB2X)
+COMPONENT_TARGETS += $(HARDWARE_CB3X)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP2E)
+COMPONENT_TARGETS += $(HARDWARE_NANOPI_NEO)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PL2)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PI5)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PI5B)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PI5P)
+COMPONENT_TARGETS += $(HARDWARE_ROCK_5B)
+COMPONENT_TARGETS += $(HARDWARE_WECHIP_TX6)
+COMPONENT_TARGETS += $(HARDWARE_REPKA_PI3)
+COMPONENT_TARGETS += $(HARDWARE_FFRK3288)
+COMPONENT_TARGETS += $(HARDWARE_POIN2)
+COMPONENT_TARGETS += $(HARDWARE_RK3328_CC)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_EDGE)
+COMPONENT_TARGETS += $(HARDWARE_LEEZ_P710)
+COMPONENT_TARGETS += $(HARDWARE_M201)
+COMPONENT_TARGETS += $(HARDWARE_MXV)
+COMPONENT_TARGETS += $(HARDWARE_P201)
+COMPONENT_TARGETS += $(HARDWARE_NEXBOX_A95X)
+COMPONENT_TARGETS += $(HARDWARE_ODROID_C2)
+COMPONENT_TARGETS += $(HARDWARE_P212)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM)
+COMPONENT_TARGETS += $(HARDWARE_Q201)
+COMPONENT_TARGETS += $(HARDWARE_ENYBOX_X2)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM2)
+COMPONENT_TARGETS += $(HARDWARE_NIT6Q)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6DL_C)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6Q_C)
+COMPONENT_TARGETS += $(HARDWARE_BONE_BLACK)
+COMPONENT_TARGETS += $(HARDWARE_OMAP5UEVM)
+COMPONENT_TARGETS += $(HARDWARE_DRA7XXEVM)
+COMPONENT_TARGETS += $(HARDWARE_CI20)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_T1)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_M1)
+COMPONENT_TARGETS += $(HARDWARE_S824L)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN)
+COMPONENT_TARGETS += $(HARDWARE_S824L_LSB)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_VISIONFIVE2)
+COMPONENT_TARGETS += $(HARDWARE_SIFIVE_U740)
+
+
+NEED_ABS_PATH = true
+COMPONENT_IS_3PP = true
+
+
+include ../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES = sources/packages/a/cryptsetup
+
+REQUIRES = app/util-linux/2.38.1
+REQUIRES += app/lvm2/2.03.11
+REQUIRES += net/openssl/1.1.1r
+REQUIRES += libs/argon2/20190702
+REQUIRES += libs/libssh/0.9.5
+REQUIRES += libs/json-c/0.15
+REQUIRES += libs/popt/1.18
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version = 2.6.1
+tar_xz_archive = $(SRC_PACKAGE_PATH)/packages/a/cryptsetup/cryptsetup-$(version).tar.xz
+SRC_ARCHIVE = $(tar_xz_archive)
+SRC_DIR = $(TARGET_BUILD_DIR)/cryptsetup-$(version)
+src_dir_name = cryptsetup-$(version)
+src_done = $(TARGET_BUILD_DIR)/.source_done
+
+PATCHES = PATCHES
+
+build_target = $(TARGET_BUILD_DIR)/.build_done
+install_target = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = app
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+CRYPTSETUP_PKG_NAME = cryptsetup
+CRYPTSETUP_PKG_VERSION = 2.6.1
+CRYPTSETUP_PKG_ARCH = $(PKGARCH)
+CRYPTSETUP_PKG_DISTRO_NAME = $(DISTRO_NAME)
+CRYPTSETUP_PKG_DISTRO_VERSION = $(DISTRO_VERSION)
+CRYPTSETUP_PKG_GROUP = $(PKG_GROUP)
+### |---handy-ruler-------------------------------|
+CRYPTSETUP_PKG_SHORT_DESCRIPTION = utility for setting up encrypted filesystems
+CRYPTSETUP_PKG_URL = $(BUG_URL)
+CRYPTSETUP_PKG_LICENSE = GPLv2
+CRYPTSETUP_PKG_DESCRIPTION_FILE = $(TARGET_BUILD_DIR)/$(CRYPTSETUP_PKG_NAME)-pkg-description
+CRYPTSETUP_PKG_DESCRIPTION_FILE_IN = $(CRYPTSETUP_PKG_NAME)-pkg-description.in
+CRYPTSETUP_PKG_INSTALL_SCRIPT = $(CRYPTSETUP_PKG_NAME)-pkg-install.sh
+
+CRYPTSETUP_PKG = $(CURDIR)/$(TARGET_BUILD_DIR)/$(CRYPTSETUP_PKG_NAME)-package
+
+pkg_basename = $(CRYPTSETUP_PKG_NAME)-$(CRYPTSETUP_PKG_VERSION)-$(CRYPTSETUP_PKG_ARCH)-$(CRYPTSETUP_PKG_DISTRO_NAME)-$(CRYPTSETUP_PKG_DISTRO_VERSION)
+
+pkg_archive = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_certificate = $(call cert-name,$(pkg_archive))
+pkg_signature = $(call sign-name,$(pkg_archive))
+pkg_description = $(call desc-name,$(pkg_archive))
+products = $(call pkg-files,$(pkg_archive))
+
+
+BUILD_TARGETS = $(build_target)
+BUILD_TARGETS += $(install_target)
+
+PRODUCT_TARGETS = $(products)
+
+ROOTFS_TARGETS = $(pkg_archive)
+
+
+include ../../../build-system/core.mk
+
+
+env_sysroot = DESTDIR=$(CRYPTSETUP_PKG)
+
+extra_configure_switches = --libdir=/usr/lib$(LIBSUFFIX)
+extra_configure_switches += --datadir=/usr/share
+extra_configure_switches += --docdir=/usr/share/doc/$(src_dir_name)
+extra_configure_switches += --mandir=/usr/share/man
+
+extra_configure_switches += --sysconfdir=/etc
+extra_configure_switches += --localstatedir=/var
+
+extra_configure_switches += --enable-cryptsetup-reencrypt
+extra_configure_switches += --enable-libargon2
+extra_configure_switches += --disable-asciidoc
+
+
+ifeq ($(__ENABLE_STATIC__),yes)
+extra_configure_switches += --enable-static=yes
+else
+extra_configure_switches += --enable-static=no
+endif
+extra_configure_switches += --enable-shared=yes
+
+
+TARGET_BIN_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX)
+TARGET_LIB_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX):/usr/lib/../lib$(LIBSUFFIX)
+
+LDFLAGS += -Wl,-rpath,$(TARGET_LIB_RPATH)
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+ $(UNPACK_SRC_ARCHIVE)
+ $(APPLY_PATCHES)
+ @touch $@
+
+$(build_target): $(src_done)
+ @cd $(SRC_DIR) && \
+ $(BUILD_ENVIRONMENT) ./configure \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --build=$(BUILD) \
+ --host=$(TARGET) \
+ $(extra_configure_switches)
+ @cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) $(MAKE)
+ @touch $@
+
+$(install_target): $(build_target)
+ @mkdir -p $(CRYPTSETUP_PKG)
+ @cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+ # ======= Add the rc script: =======
+ @mkdir -p $(CRYPTSETUP_PKG)/etc/rc.d
+ @cat $(CURDIR)/rc.d/rc.luks > $(CRYPTSETUP_PKG)/etc/rc.d/rc.luks.new
+ @chmod 644 $(CRYPTSETUP_PKG)/etc/rc.d/rc.luks.new
+ # ======= Move the cryptsetup binary to /sbin: =======
+ @mkdir -p $(CRYPTSETUP_PKG)/sbin
+ @( cd $(CRYPTSETUP_PKG)/usr/sbin ; \
+ mv cryptsetup ../../sbin ; \
+ ln -sf ../../sbin/cryptsetup . ; \
+ )
+ # ======= Install Documentation =======
+ @( cd $(CRYPTSETUP_PKG)/usr/share/man/man8 ; \
+ for file in *.8 ; do \
+ ln=`head -n 1 $$file` ; \
+ if [ "`echo $$ln | grep '^\.so '`" != "" ] ; then \
+ origin=`echo $$ln | cut -f 2 -d ' '` ; \
+ origin=`basename $$origin` ; \
+ rm -f $$file ; \
+ ln -sf $$origin $$file ; \
+ fi ; \
+ done ; \
+ )
+ @if [ -d $(CRYPTSETUP_PKG)/usr/share/man ]; then \
+ ( cd $(CRYPTSETUP_PKG)/usr/share/man ; \
+ for manpagedir in `find . -type d -name "man*"` ; do \
+ ( cd $$manpagedir ; \
+ for eachpage in `find . -type l -maxdepth 1` ; do \
+ ln -s `readlink $$eachpage`.gz $$eachpage.gz ; \
+ rm $$eachpage ; \
+ done ; \
+ gzip -9 *.? ; \
+ ) \
+ done \
+ ) \
+ fi
+ @mkdir -p $(CRYPTSETUP_PKG)/usr/doc/$(src_dir_name)
+ @cp -a $(SRC_DIR)/AUTHORS $(SRC_DIR)/COPYING* \
+ $(CRYPTSETUP_PKG)/usr/doc/$(src_dir_name)
+ @mkdir -p $(CRYPTSETUP_PKG)/usr/share/doc/$(src_dir_name)/docs
+ @( cd $(SRC_DIR) ; \
+ cp -a AUTHORS COPYING* FAQ.md README.md \
+ $(CRYPTSETUP_PKG)/usr/share/doc/$(src_dir_name) \
+ )
+ @( cd $(SRC_DIR)/docs ; \
+ cp -a examples *.txt *.pdf v$(version)-ReleaseNotes \
+ $(CRYPTSETUP_PKG)/usr/share/doc/$(src_dir_name)/docs \
+ )
+ # ======= remove target path from target libtool *.la files =======
+ @( cd $(CRYPTSETUP_PKG)/usr/lib$(LIBSUFFIX) ; \
+ sed -i "s,$(TARGET_DEST_DIR),,g" libcryptsetup.la ; \
+ )
+ @( cd $(CRYPTSETUP_PKG)/usr/lib$(LIBSUFFIX)/cryptsetup ; \
+ sed -i "s,$(TARGET_DEST_DIR),,g" libcryptsetup-token-ssh.la ; \
+ )
+ # ======= Install the same to $(TARGET_DEST_DIR) =======
+ $(call install-into-devenv, $(CRYPTSETUP_PKG))
+ # ======= tune libtool *.la search path to the target destination for development =======
+ @( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX) ; \
+ sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libcryptsetup.la ; \
+ sed -i "s,L/lib,L$(TARGET_DEST_DIR)/lib,g" libcryptsetup.la ; \
+ )
+ @( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/cryptsetup ; \
+ sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libcryptsetup-token-ssh.la ; \
+ sed -i "s,L/lib,L$(TARGET_DEST_DIR)/lib,g" libcryptsetup-token-ssh.la ; \
+ )
+ # ======= tune pkg-config *.pc search path to the target destination for development =======
+ @( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/pkgconfig ; \
+ sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libcryptsetup.pc ; \
+ )
+ # ======= Strip binaries =======
+ @( cd $(CRYPTSETUP_PKG) ; \
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ )
+ifeq ($(__ENABLE_STATIC__),yes)
+ @( cd $(CRYPTSETUP_PKG) ; \
+ find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $(STRIP) -g 2> /dev/null ; \
+ )
+endif
+ifneq ($(PATCHELF),)
+ # ======= Set RPATH/RUNPATH for target binaries =======
+ @( cd $(CRYPTSETUP_PKG) ; \
+ for file in `find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+ rpath=`$(PATCHELF) --print-rpath $$file 2> /dev/null` ; \
+ if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+ $(PATCHELF) --set-rpath $(TARGET_BIN_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+ fi ; \
+ done ; \
+ )
+ # ======= Set RPATH/RUNPATH for target shared objects =======
+ @( cd $(CRYPTSETUP_PKG)/usr/lib$(LIBSUFFIX) ; \
+ for file in `find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+ rpath=`$(PATCHELF) --print-rpath $$file 2> /dev/null` ; \
+ if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+ $(PATCHELF) --set-rpath $(TARGET_LIB_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+ fi ; \
+ done ; \
+ )
+endif
+ @touch $@
+
+$(CRYPTSETUP_PKG_DESCRIPTION_FILE): $(CRYPTSETUP_PKG_DESCRIPTION_FILE_IN)
+ @cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_certificate) : $(pkg_archive) ;
+$(pkg_signature) : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(CRYPTSETUP_PKG_DESCRIPTION_FILE) $(CRYPTSETUP_PKG_INSTALL_SCRIPT)
+ @cp $(CRYPTSETUP_PKG_DESCRIPTION_FILE) $(CRYPTSETUP_PKG)/.DESCRIPTION
+ @cp $(CRYPTSETUP_PKG_INSTALL_SCRIPT) $(CRYPTSETUP_PKG)/.INSTALL
+ @$(BUILD_PKG_REQUIRES) $(CRYPTSETUP_PKG)/.REQUIRES
+ @echo "pkgname=$(CRYPTSETUP_PKG_NAME)" > $(CRYPTSETUP_PKG)/.PKGINFO ; \
+ echo "pkgver=$(CRYPTSETUP_PKG_VERSION)" >> $(CRYPTSETUP_PKG)/.PKGINFO ; \
+ echo "arch=$(CRYPTSETUP_PKG_ARCH)" >> $(CRYPTSETUP_PKG)/.PKGINFO ; \
+ echo "distroname=$(CRYPTSETUP_PKG_DISTRO_NAME)" >> $(CRYPTSETUP_PKG)/.PKGINFO ; \
+ echo "distrover=$(CRYPTSETUP_PKG_DISTRO_VERSION)" >> $(CRYPTSETUP_PKG)/.PKGINFO ; \
+ echo "group=$(CRYPTSETUP_PKG_GROUP)" >> $(CRYPTSETUP_PKG)/.PKGINFO ; \
+ echo "short_description=\"$(CRYPTSETUP_PKG_SHORT_DESCRIPTION)\"" >> $(CRYPTSETUP_PKG)/.PKGINFO ; \
+ echo "url=$(CRYPTSETUP_PKG_URL)" >> $(CRYPTSETUP_PKG)/.PKGINFO ; \
+ echo "license=$(CRYPTSETUP_PKG_LICENSE)" >> $(CRYPTSETUP_PKG)/.PKGINFO
+ @$(PSEUDO) sh -c "cd $(CRYPTSETUP_PKG) && \
+ chown -R root:root . && \
+ $(MAKE_PACKAGE) -J --linkadd=yes $(GNUPG_OPTIONS) -m -d .. ."
Index: PATCHES
===================================================================
Index: cryptsetup-pkg-description.in
===================================================================
--- cryptsetup-pkg-description.in (nonexistent)
+++ cryptsetup-pkg-description.in (revision 334)
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+cryptsetup: cryptsetup @VERSION@ (utility for setting up encrypted filesystems)
+cryptsetup:
+cryptsetup: LUKS is a standard for cross-platform hard disk encryption.
+cryptsetup: It provides secure management of multiple userpasswords and
+cryptsetup: stores setup information in the partition header. LUKS for dm-crypt
+cryptsetup: is now implemented in cryptsetup replacing the original cryptsetup.
+cryptsetup: It provides all the functionally of the original version plus all
+cryptsetup: LUKS features.
+cryptsetup:
+cryptsetup: Homepage: https://gitlab.com/cryptsetup/cryptsetup
+cryptsetup:
Index: cryptsetup-pkg-install.sh
===================================================================
--- cryptsetup-pkg-install.sh (nonexistent)
+++ cryptsetup-pkg-install.sh (revision 334)
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+# Preserve new files
+install_file() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ install_file $NEW
+}
+
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ preserve_perms etc/rc.d/rc.luks.new
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_update() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_update() {
+ post_install
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
Property changes on: cryptsetup-pkg-install.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: rc.d/rc.luks
===================================================================
--- rc.d/rc.luks (nonexistent)
+++ rc.d/rc.luks (revision 334)
@@ -0,0 +1,90 @@
+#!/bin/bash
+# Open any volumes created by cryptsetup.
+#
+# Some notes on /etc/crypttab in Slackware:
+# Only LUKS formatted volumes are supported (except for swap)
+# crypttab follows the following format:
+# <luks_name> <device> <password> <options>
+#
+# <luks_name>: This is the name of your LUKS volume.
+# For example: crypt-home
+#
+# <device>: This is the device containing your LUKS volume.
+# For example: /dev/sda2
+#
+# <password>: This is either the volume password in plain text, or the name of
+# a key file. Use 'none' to interactively enter password on boot.
+#
+# <options>: Comma-separated list of options. Note that there must be a
+# password field for any options to be picked up (use a password of 'none' to
+# get a password prompt at boot). The following options are supported:
+#
+# discard -- this will cause --allow-discards to be passed to the cryptsetup
+# program while opening the LUKS volume.
+#
+# ro -- this will cause --readonly to be passed to the cryptsetup program while
+# opening the LUKS volume.
+#
+# swap -- this option cannot be used with other options. The device given will
+# be formatted as a new encrypted volume with a random key on boot, and used as
+# swap.
+#
+# keyscript=<path/to/script> -- get the password from the named script's stdout.
+# The only parameter sent to script is the <password> field, but the script can
+# ignore it.
+#
+
+if [ -f /etc/crypttab -a -x /sbin/cryptsetup ]; then
+ # First, check for device-mapper support.
+ if ! grep -wq device-mapper /proc/devices ; then
+ # If device-mapper exists as a module, try to load it.
+ # Try to load a device-mapper kernel module:
+ /sbin/modprobe -q dm-mod
+ fi
+ # NOTE: we only support LUKS formatted volumes (except for swap)!
+ # The input for this loop comes from after the "done" below, so that we can
+ # use fd3 and keep stdin functional for password entry or in case a keyscript
+ # requires it:
+ while read line <&3; do
+ eval LUKSARRAY=( $line )
+ LUKS="${LUKSARRAY[0]}"
+ DEV="${LUKSARRAY[1]}"
+ PASS="${LUKSARRAY[2]}"
+ OPTS="${LUKSARRAY[3]}"
+ KEYSCRIPT="$(echo $OPTS | sed -n 's/.*keyscript=\([^,]*\).*/\1/p')"
+ LUKSOPTS=""
+ if echo $OPTS | grep -wq ro ; then LUKSOPTS="${LUKSOPTS} --readonly" ; fi
+ if echo $OPTS | grep -wq discard ; then LUKSOPTS="${LUKSOPTS} --allow-discards" ; fi
+ # Skip LUKS volumes that were already unlocked (in the initrd):
+ /sbin/cryptsetup status $LUKS 2>/dev/null | head -n 1 | grep -q "is active" && continue
+ if /sbin/cryptsetup isLuks $DEV 2>/dev/null ; then
+ if [ -z "${LUKSOPTS}" ]; then
+ echo "Unlocking LUKS encrypted volume '${LUKS}' on device '$DEV':"
+ else
+ echo "Unlocking LUKS encrypted volume '${LUKS}' on device '$DEV' with options '${LUKSOPTS}':"
+ fi
+ if [ -x "${KEYSCRIPT}" ]; then
+ # A password was outputted by a script
+ ${KEYSCRIPT} "${PASS}" | /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS
+ echo
+ elif [ -n "${PASS}" -a "${PASS}" != "none" ]; then
+ if [ -f "${PASS}" ]; then
+ # A password was given a key-file filename
+ /sbin/cryptsetup ${LUKSOPTS} --key-file=${PASS} luksOpen $DEV $LUKS
+ else
+ # A password was provided in plain text
+ echo "${PASS}" | /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS
+ fi
+ else
+ # No password was given, or a password of 'none' was given
+ /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS
+ fi
+ elif echo $OPTS | grep -wq swap ; then
+ # If any of the volumes is to be used as encrypted swap,
+ # then encrypt it using a random key and run mkswap:
+ echo "Creating encrypted swap volume '${LUKS}' on device '$DEV':"
+ /sbin/cryptsetup --batch-mode --cipher=aes --key-file=/dev/urandom --key-size=256 create $LUKS $DEV
+ mkswap /dev/mapper/$LUKS
+ fi
+ done 3< <(grep -vE '^(#|$)' /etc/crypttab)
+fi
Index: .
===================================================================
--- . (nonexistent)
+++ . (revision 334)
Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~