New Upstream Snapshot - dpaste

Ready changes

Summary

Merged new upstream version: 0.4.0+git20200513.1.a9c71c4 (was: 0.4.0).

Resulting package

Built on 2023-01-22T04:43 (took 2m54s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots dpaste-dbgsymapt install -t fresh-snapshots dpaste

Lintian Result

Diff

diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index c8dea6c..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,49 +0,0 @@
-# Compiled Object files
-*.o
-*.obj
-src/dpaste
-tests/dptest
-
-# Executables
-*.exe
-*.out
-*.app
-
-# git backup files
-*.orig
-
-# vim swap files
-*.swp
-*.swo
-
-# Ctags
-tags
-
-# YCM
-.ycm_extra_conf.py*
-compile_commands.json
-
-# autotools files
-/ac
-Makefile
-Makefile.in
-/aclocal.m4
-/autom4te.cache/
-/config.*
-/configure
-/depcomp
-/install-sh
-/libtool
-/ltmain.sh
-/m4/
-/missing
-/stamp-h?
-.deps/
-.dirstamp
-.libs/
-*.l[ao]
-*~
-*.pc
-
-# CMake dir
-build
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index e69de29..0000000
diff --git a/README.md b/README.md
index 3375b36..2dc58b0 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,6 @@
 # dpaste
 
 A simple pastebin for light values (max 64KB) using OpenDHT distributed hash table.
-
 ## Example
 
 Let a file `A.md` you want to share.
@@ -20,7 +19,7 @@ $ dpaste -g dpaste:74236E62
 ## Encryption
 
 One can encrypt his document using the option `--aes-encrypt` or
-`--gpg-encrypt -r {recipient}`. In the former case, AES-CBC is used and in
+`--gpg-encrypt -r {recipient}`. In the former case, AES-GCM is used and in
 the latter it is simple GPG encryption. One can also *sign-then-encrypt* his
 message by adding the flag `-s` (a working gpg configuration needs to be found
 on the system). If both `--aes-encrypt` and `--gpg-encrypt` (or `-s`) options
@@ -36,7 +35,7 @@ password is appended to the location code used to index on the DHT. For e.g.:
 
 ```sh
 $ dpaste --aes-encrypt < ${some_file}
-DPASTE: Encrypting (aes-cbc) data...
+DPASTE: Encrypting (aes-gcm) data...
 DPASTE: Pasting data...
 dpaste:B79F2F91C811D5DC
 ```
@@ -98,13 +97,20 @@ not likely to be "down".
 
 ## Roadmap
 
-- Add support for values with size greater than 64Ko (splitting values across
-  multiple locations);
+- Add support for values with size greater than 64KiB (splitting values across
+  multiple locations, see #17);
+- Support for multi-lingual interface (--help, info/debug messages, see #18);
+- Support for longer paste life time (OpenDHT's default is 10 minutes, see #19);
+- Switch from the currently used [small python REST API server script][pyserver] to
+  OpenDHT's proxy (see #20);
+- Improve the logging code (with dedicated library?);
 - ~~Password based encryption (AES using gnutls)~~;
 - ~~Add user configuration file system;~~
 - ~~Support RSA encrypt/sign using user's GPG key;~~
 - ~~Support running the DHT node as service for executing dpaste operations.~~
 
+[pyserver]: https://github.com/savoirfairelinux/opendht/blob/459c1344aac37519ccdf19aebff56027771d2e72/python/tools/http_server.py
+
 ## Author
 
 - Simon Désaulniers <sim.desaulniers@gmail.com>
diff --git a/debian/changelog b/debian/changelog
index 5066db7..64c6c07 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,10 @@
-dpaste (0.4.0-1) UNRELEASED; urgency=medium
+dpaste (0.4.0+git20200513.1.a9c71c4-1) UNRELEASED; urgency=medium
 
+  [ Simon Désaulniers ]
   * Initial release. Closes: #866359
 
- -- Simon Désaulniers <sim.desaulniers@gmail.com>  Tue, 12 May 2020 20:34:09 -0400
+  [ Debian Janitor ]
+  * New upstream snapshot.
+  * Drop patch 0003-man-updated-version-from-upstream.patch, present upstream.
+
+ -- Simon Désaulniers <sim.desaulniers@gmail.com>  Sun, 22 Jan 2023 04:41:03 -0000
diff --git a/debian/patches/0001-http_client-include-v3-of-nlohmann-header-file.patch b/debian/patches/0001-http_client-include-v3-of-nlohmann-header-file.patch
index f342593..729391c 100644
--- a/debian/patches/0001-http_client-include-v3-of-nlohmann-header-file.patch
+++ b/debian/patches/0001-http_client-include-v3-of-nlohmann-header-file.patch
@@ -6,10 +6,10 @@ Subject: http_client: include v3 of nlohmann header file
  src/http_client.cpp | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/src/http_client.cpp b/src/http_client.cpp
-index 1864ded..1580bed 100644
---- a/src/http_client.cpp
-+++ b/src/http_client.cpp
+Index: dpaste.git/src/http_client.cpp
+===================================================================
+--- dpaste.git.orig/src/http_client.cpp
++++ dpaste.git/src/http_client.cpp
 @@ -25,7 +25,7 @@
  #include <curlpp/Options.hpp>
  #include <curlpp/Exception.hpp>
diff --git a/debian/patches/0002-configure.ac-rm-O3-compilation-flag.patch b/debian/patches/0002-configure.ac-rm-O3-compilation-flag.patch
index e993357..e2740e4 100644
--- a/debian/patches/0002-configure.ac-rm-O3-compilation-flag.patch
+++ b/debian/patches/0002-configure.ac-rm-O3-compilation-flag.patch
@@ -10,10 +10,10 @@ cannot send requests on the DHT network and fails instantly.
  configure.ac | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/configure.ac b/configure.ac
-index b8f9107..509bae7 100644
---- a/configure.ac
-+++ b/configure.ac
+Index: dpaste.git/configure.ac
+===================================================================
+--- dpaste.git.orig/configure.ac
++++ dpaste.git/configure.ac
 @@ -13,7 +13,7 @@ CXXFLAGS="${CXXFLAGS} -std=c++17"
  AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Build in debug mode, adds stricter warnings, disables optimization]))
  AS_IF([test "x$enable_debug" = "xyes"],
diff --git a/debian/patches/0003-man-updated-version-from-upstream.patch b/debian/patches/0003-man-updated-version-from-upstream.patch
deleted file mode 100644
index c57ca0c..0000000
--- a/debian/patches/0003-man-updated-version-from-upstream.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From: =?utf-8?q?Simon_D=C3=A9saulniers?= <sim.desaulniers@gmail.com>
-Date: Tue, 12 May 2020 17:44:05 -0400
-Subject: man: updated version from upstream
-
-The appropriate version for 0.4.0 was published on the repository after
-its release.
----
- doc/dpaste.1 | 30 +++++++++++++++++++-----------
- 1 file changed, 19 insertions(+), 11 deletions(-)
-
-diff --git a/doc/dpaste.1 b/doc/dpaste.1
-index e823f6a..70a9b5f 100644
---- a/doc/dpaste.1
-+++ b/doc/dpaste.1
-@@ -6,19 +6,19 @@
- table.
- 
- .SH SYNOPSIS
--.B dpaste [-h]
-+.B dpaste -h
- 
--.B dpaste [-v]
-+.B dpaste -v
- 
--.B dpaste [-g \fIcode\fP]
-+.B dpaste [\fIoptions\fP...]
- 
--.B dpaste [-e \fIcode\fP] [-s]
-+.B dpaste -g \fIcode\fP [\fIoptions\fP...]
- 
- .SH DESCRIPTION
- 
- By default, \fBdpaste\fP will read its standard input for a file to paste on
- OpenDHT.  For fetching a file, you have to provide the \fIcode\fP associated to
--it using the flag \fB-g\fP. Then, \fBdpaste\fP will
-+it using the flag \fB-g\fP.
- 
- .SH OPTIONS
- 
-@@ -35,16 +35,24 @@ Shows the version of the program.
- Specifies the code \fIcode\fP used to recover the file on the DHT.
- 
- .TP
--\fB-e\fP \fIrecipient\fP, \fB--encrypt\fP \fIrecipient\fP
--Specifies wether the message should be encrypted using the OpenPGP protocol. If
--so, \fIrecipient\fP is the recipient to encrypt message to. This can be any
--string that GPG will correctly parse (fingerprint, email, ...).
-+\fB--aes-encrypt\fP
-+Use AES scheme for encryption. Password is automatically saved in the returned
-+code ("dpaste:XXXXXX").
-+
-+.TP
-+\fB--gpg-encrypt\fP
-+Use GPG scheme for encryption.
-+
-+.TP
-+\fB-r\fP \fIrecipient\fP, \fB--recipients\fP \fIrecipient\fP
-+Specify the list of recipients to use for GPG encryption (--gpg--encrypt). Use
-+\fB-r\fP multiple times to specify a list of recipients.
- 
- .TP
- \fB-s\fP, \fB--sign\fP
- Tells wether message should be signed using the user's GPG key. The key has to
--be configured through the configuration file
--(\fB$XDG_CONFIG_DIR/dpaste.conf\fP).
-+be configured through the configuration file (\fB$XDG_CONFIG_DIR/dpaste.conf\fP,
-+keyword: \fBpgp_key_id\fP).
- 
- .TP
- \fB--no-decrypt\fP
diff --git a/debian/patches/series b/debian/patches/series
index 9f0d6a9..180b802 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
 0001-http_client-include-v3-of-nlohmann-header-file.patch
 0002-configure.ac-rm-O3-compilation-flag.patch
-0003-man-updated-version-from-upstream.patch
diff --git a/doc/dpaste.1 b/doc/dpaste.1
index e823f6a..70a9b5f 100644
--- a/doc/dpaste.1
+++ b/doc/dpaste.1
@@ -6,19 +6,19 @@
 table.
 
 .SH SYNOPSIS
-.B dpaste [-h]
+.B dpaste -h
 
-.B dpaste [-v]
+.B dpaste -v
 
-.B dpaste [-g \fIcode\fP]
+.B dpaste [\fIoptions\fP...]
 
-.B dpaste [-e \fIcode\fP] [-s]
+.B dpaste -g \fIcode\fP [\fIoptions\fP...]
 
 .SH DESCRIPTION
 
 By default, \fBdpaste\fP will read its standard input for a file to paste on
 OpenDHT.  For fetching a file, you have to provide the \fIcode\fP associated to
-it using the flag \fB-g\fP. Then, \fBdpaste\fP will
+it using the flag \fB-g\fP.
 
 .SH OPTIONS
 
@@ -35,16 +35,24 @@ Shows the version of the program.
 Specifies the code \fIcode\fP used to recover the file on the DHT.
 
 .TP
-\fB-e\fP \fIrecipient\fP, \fB--encrypt\fP \fIrecipient\fP
-Specifies wether the message should be encrypted using the OpenPGP protocol. If
-so, \fIrecipient\fP is the recipient to encrypt message to. This can be any
-string that GPG will correctly parse (fingerprint, email, ...).
+\fB--aes-encrypt\fP
+Use AES scheme for encryption. Password is automatically saved in the returned
+code ("dpaste:XXXXXX").
+
+.TP
+\fB--gpg-encrypt\fP
+Use GPG scheme for encryption.
+
+.TP
+\fB-r\fP \fIrecipient\fP, \fB--recipients\fP \fIrecipient\fP
+Specify the list of recipients to use for GPG encryption (--gpg--encrypt). Use
+\fB-r\fP multiple times to specify a list of recipients.
 
 .TP
 \fB-s\fP, \fB--sign\fP
 Tells wether message should be signed using the user's GPG key. The key has to
-be configured through the configuration file
-(\fB$XDG_CONFIG_DIR/dpaste.conf\fP).
+be configured through the configuration file (\fB$XDG_CONFIG_DIR/dpaste.conf\fP,
+keyword: \fBpgp_key_id\fP).
 
 .TP
 \fB--no-decrypt\fP
diff --git a/src/aescrypto.cpp b/src/aescrypto.cpp
index c859be9..0fdef1d 100644
--- a/src/aescrypto.cpp
+++ b/src/aescrypto.cpp
@@ -33,12 +33,12 @@ std::string AES::getPassword(const std::shared_ptr<Parameters>& params) const {
 }
 
 std::vector<uint8_t> AES::processPlainText(std::vector<uint8_t> plain_text, std::shared_ptr<Parameters>&& params) {
-    DPASTE_MSG("Encrypting (aes-cbc) data...");
+    DPASTE_MSG("Encrypting (aes-gcm) data...");
     return dht::crypto::aesEncrypt(plain_text, getPassword(params));
 }
 
 std::vector<uint8_t> AES::processCipherText(std::vector<uint8_t> cipher_text, std::shared_ptr<Parameters>&& params) {
-    DPASTE_MSG("Decrypting (aes-cbc)...");
+    DPASTE_MSG("Decrypting (aes-gcm)...");
     return dht::crypto::aesDecrypt(cipher_text, getPassword(params));
 }
 

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/lib/debug/.build-id/4e/2c9bb62eaaabd81b9c8ef5b5cd9c358b1881b8.debug

Files in first set of .debs but not in second

-rw-r--r--  root/root   /usr/lib/debug/.build-id/12/82783722b7552f4287e0f757a5faaa9f0e81d0.debug

Control files of package dpaste: lines which differ (wdiff format)

  • Depends: libargon2-1 (>= 0~20171227), libb64-0d (>= 1.2), libc6 (>= 2.34), libcurl3-gnutls (>= 7.16.2), libcurlpp0 (>= 0.8.1-2~), libgcc-s1 (>= 3.0), libglibmm-2.4-1v5 (>= 2.66.6), 2.66.5), libgnutls30 (>= 3.7.3), libgpgmepp6 (>= 1.18.0), libopendht2 1.17.1), libhttp-parser2.9 (>= 2.7.1), libjsoncpp25 (>= 1.9.5), libnettle8, libssl3 (>= 2.4.12), 3.0.0), libstdc++6 (>= 12)

Control files of package dpaste-dbgsym: lines which differ (wdiff format)

  • Build-Ids: 1282783722b7552f4287e0f757a5faaa9f0e81d0 4e2c9bb62eaaabd81b9c8ef5b5cd9c358b1881b8

More details

Full run details