Skip to content

Commit

Permalink
Rebased against release 6.2.0 (b00627e7)
Browse files Browse the repository at this point in the history
  • Loading branch information
rwpenney committed Jan 7, 2023
1 parent df16efa commit d505cd4
Show file tree
Hide file tree
Showing 12 changed files with 108 additions and 41 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ man/*/Makefile

po/Makefile
po/Makefile.in
po/messages.mo
po/POTFILES
po/stamp-po
po/*.gmo
Expand Down
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ChangeLog for cryptmount (http://cryptmount.sourceforge.net)

07Jan23 - *** cryptmount-6.2 released

02Jan23 - Enabled libudev by default

20Dec22 - Updated various maintainer URLs to point to github.com
Expand Down
28 changes: 26 additions & 2 deletions RELNOTES
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Release notes for cryptmount-6.1.1
Release notes for cryptmount-6.2

RW Penney, December 2022
RW Penney, January 2023

Introduction
============
Expand All @@ -26,6 +26,30 @@ control over the configuration and mounting of encrypted filesystems,
especially within system start-up scripts.


Summary of new features in cryptmount-6.2
=========================================

This (stable) release offers the following improvements:

* More robust handshaking on device setup using libudev

It has been tested on the following systems:

* Arch Linux (early-Jan-2023) (x86_64)

* Debian GNU/Linux 12.x ("bookworm"/"testing", early-Jan-2023) (amd64)

* Debian GNU/Linux 11.6 ("bullseye") (amd64)

* Debian GNU/Linux 10.13 ("buster") (x86)

* Fedora 37 (x86_64)

* openSUSE Leap 15.4 (x86_64)

* Ubuntu 22.10 ("kinetic") (x86_64)


Summary of new features in cryptmount-6.1
=========================================

Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dnl autoconf script for cryptmount
dnl (C)Copyright 2005-2022, RW Penney
dnl (C)Copyright 2005-2023, RW Penney

dnl run 'aclocal; autoconf; automake -a -c -i; ./configure; make'

AC_INIT(cryptmount, 6.2-beta, [email protected])
AC_INIT(cryptmount, 6.2.0, [email protected])
AC_PREREQ(2.59)

test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc
Expand Down
10 changes: 6 additions & 4 deletions cryptmount.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Summary: Let ordinary users mount an encrypted file system
Name: cryptmount
Version: 6.1.1
Version: 6.2.0
Release: 1%{?dist}
License: GPL
URL: http://cryptmount.sourceforge.net
Expand All @@ -13,7 +13,7 @@ Source0: http://sourceforge.net/projects/cryptmount/files/cryptmount-%{version}/
%if 0%{?fedora}
#{
# Fedora
BuildRequires: cryptsetup-devel libgcrypt-devel
BuildRequires: cryptsetup-devel libgcrypt-devel systemd-devel
Requires: cryptsetup-libs libgcrypt device-mapper
#}
%else
Expand All @@ -22,7 +22,7 @@ Requires: cryptsetup-libs libgcrypt device-mapper
#{
# RHEL, CentOS
%if 0%{?rhl} >= 7
BuildRequires: cryptsetup-devel libgcrypt-devel
BuildRequires: cryptsetup-devel libgcrypt-devel systemd-devel
Requires: cryptsetup-libs libgcrypt device-mapper
%else
BuildRequires: cryptsetup-luks-devel libgcrypt-devel
Expand Down Expand Up @@ -76,7 +76,7 @@ device-mapper and loopback devices before mounting.

%files -f %{name}.lang
%defattr(-, root, root, 0755)
%doc AUTHORS ChangeLog COPYING NEWS README* RELNOTES ToDo
%doc AUTHORS ChangeLog COPYING README* RELNOTES
%doc %{_mandir}/man5/cmtab.5*
%doc %{_mandir}/man8/cryptmount*.8*
%doc %{_mandir}/*/man5/cmtab.5*
Expand All @@ -100,6 +100,8 @@ fi


%changelog
* Sat Jan 07 2023 RW Penney <[email protected]> - 6.2
-- Enabled libudev by default
* Sat Oct 08 2022 RW Penney <[email protected]> - 6.1
-- Refreshed installation documentation and inter-process locking
* Sat Sep 03 2022 RW Penney <[email protected]> - 6.0
Expand Down
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
cryptmount (6.2.0-1) unstable; urgency=low

* New upstream release
- migrated device-setup handshaking using libudev

-- RW Penney <[email protected]> Sat, 07 Jan 2023 09:15:00 +0000

cryptmount (6.1.0-1) unstable; urgency=low

* New upstream release
Expand Down
2 changes: 1 addition & 1 deletion debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Source: https://github.com/rwpenney/cryptmount
License: GPL-2+

Files: *
Copyright: (C) 2005 - 2022 RW Penney <[email protected]>
Copyright: (C) 2005 - 2023 RW Penney <[email protected]>
License: GPL-2+

Files: blowfish.c blowfish.h
Expand Down
2 changes: 1 addition & 1 deletion debian/mkDebPkg
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if [ -z "${PSEUDO_VERSION}" ]; then
PSEUDO_VERSION="${VERSION}"
fi

SRCPKG="${UPSDIR}/${PACKAGE}-${VERSION}.tar.gz"
SRCPKG=`realpath ${UPSDIR}`/"${PACKAGE}-${VERSION}.tar.gz"
if [ ! -r "${SRCPKG}" ]; then
echo "Upstream package ${SRCPKG} is not readable"
exit 1
Expand Down
21 changes: 13 additions & 8 deletions dmutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
#include "dmutils.h"


#if !HAVE_LIBUDEV

struct udev_queue_loc {
const char *path;
int is_file;
Expand All @@ -61,6 +63,8 @@ struct udev_queue_loc {
int udev_queue_size(const char *path);
int udev_active_dir(const char *path, time_t starttime, double timeout);

#endif // !HAVE_LIBUDEV


struct dm_task *devmap_prepare(int type, const char *ident)
/*! Prepare device-mapper task structure */
Expand Down Expand Up @@ -248,19 +252,20 @@ int is_configured(const char *ident, struct dm_info *dminfo)

int udev_settle()
/*! Allow time for udev events to be processed */
{ struct udev_queue_loc *udev_mode;
double totdelay = 0.0;
{ double totdelay = 0.0;
time_t starttime;
#if HAVE_LIBUDEV
struct udev *udev_ctx;
struct udev_queue *udev_qu;
#else
struct udev_queue_loc *udev_mode;
struct stat sbuff;
#endif
#if HAVE_NANOSLEEP
struct timespec delay;
#endif
int inc_ms = 250, settling = 1;
const double timeout = 10.0;
#if HAVE_LIBUDEV
struct udev *udev_ctx;
struct udev_queue *udev_qu;
#endif

/* This routine mitigates apparent race-conditions
* between udev events which may temporarily take ownership of
Expand All @@ -277,14 +282,14 @@ int udev_settle()
udev_ctx = udev_new();
//udev_selinux_init(udev_ctx);
udev_qu = udev_queue_new(udev_ctx);
#endif

#else
/* Try to find location and type of udev event queue: */
udev_mode = udev_queue_locations;
while (udev_mode->is_file) {
if (stat(udev_mode->path, &sbuff) == 0) break;
++udev_mode;
}
#endif

/* Keep waiting until there are no more queued udev events: */
do {
Expand Down
4 changes: 2 additions & 2 deletions man/cryptmount-setup.8.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" cryptmount-setup manual page
.\" (C)Copyright 2007-2023 RW Penney
.\"
.TH CRYPTMOUNT-SETUP 8 "2018-01-18" "@PACKAGE_VERSION@" "User commands"
.TH CRYPTMOUNT-SETUP 8 "2023-01-07" "@PACKAGE_VERSION@" "User commands"
.SH NAME
cryptmount-setup \- setup a new encrypted filesystem

Expand All @@ -21,7 +21,7 @@ an encrypted filesystem, to be managed by

If run by the superuser,
.B cryptmount-setup
will allow a basic encrypted filesystem to be created
will allow a basic LUKS-encrypted filesystem to be created
within an ordinary file.
The size, location, mount-point and ownership of the filesystem
can be selected interactively.
Expand Down
2 changes: 1 addition & 1 deletion man/cryptmount.8.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" cryptmount manual page
.\" (C)Copyright 2005-2023 RW Penney
.\"
.TH CRYPTMOUNT 8 "2022-09-03" "@PACKAGE_VERSION@" "User commands"
.TH CRYPTMOUNT 8 "2023-01-07" "@PACKAGE_VERSION@" "User commands"
.SH NAME
cryptmount \- mount/unmount/configure an encrypted filesystem

Expand Down
Loading

0 comments on commit d505cd4

Please sign in to comment.