Commit graph

77 commits

Author SHA1 Message Date
Radon Rosborough
d7bd98e719 Use -fmacro-prefix-map for utils
The __FILE__ macro is used in the EXCEPTION macro to report the file
name alongside error messages. This macro reports the file name
exactly as it is passed to the compiler. For most source files in
libgourou this is a nice relative path such as "src/libgourou.cpp".
However, for EXCEPTION instances in libgourou_common.h, the compiler
flag is "-I$(ROOT)/include", where $(ROOT) is an absolute path passed
from the higher Makefile. This results in an absolute path to the
build directory being hardcoded into the utils shared library and
binaries, and reported in error messages. Besides being less readable
than the more common relative paths, this triggers warnings from
packaging tools that detect inadvertent references to temporary build
directories that end up in compiled binaries and might indicate a bug.

There is a GCC feature -fmacro-prefix-map which allows to perform
substition on the values that are used for __FILE__. Use that option
to strip out the absolute path component, without changing any
functionality.

The feature was added to GCC on 2018-01-18 and released in GCC 8.1.0.

7365279fca
2026-03-14 13:51:40 +01:00
Grégory Soutadé
72cb22ad2a Refresh curl download percent only when updated 2026-02-17 20:07:57 +01:00
Grégory Soutadé
b44b988966 Fix bug in utils with -o and -O options 2026-02-01 08:56:27 +01:00
Grégory Soutadé
8f0341d0bd Some code formating 2026-01-18 15:44:20 +01:00
Grégory Soutadé
98c511d0ca Fix mkstemp unused result warning 2026-01-18 14:31:52 +01:00
Grégory Soutadé
db3e2179a9 Add PKCS1 Type 2 padding for Signing request 2026-01-18 14:31:52 +01:00
Grégory Soutadé
81faf1f9be adept_loan_mgt: manage cases were name is empty 2024-04-15 07:37:28 +02:00
Grégory Soutadé
68bf982b6f Fix use after free in DRMProcessorClientImpl::sendHTTPRequest() 2024-01-24 19:13:22 +01:00
Grégory Soutadé
e05639c09d Support HTTP error codes != 200 (exception) and cookies in drmprocessorclientimpl 2024-01-06 09:25:11 +01:00
Grégory Soutadé
fd38e84da6 Fix for Android for adept_loan_mgt.cpp (strptime format) 2024-01-06 09:22:11 +01:00
Grégory Soutadé
40dcb7a041 Add --no-notify option to utils 2023-09-06 21:17:06 +02:00
Grégory Soutadé
9a75213b49 Fix misuse of DESTDIR and PREFIX in Makefile 2023-08-08 20:13:03 +02:00
Grégory Soutadé
c259cbd5a3 Add missing libgen.h in utils for basename() call 2023-03-28 20:32:05 +02:00
Grégory Soutadé
46afe771c7 Remove old pugixml include in utils Makefile 2023-01-15 09:51:00 +01:00
Grégory Soutadé
cad2189fc2 Typo fix 2023-01-14 18:21:06 +01:00
Grégory Soutadé
50bc16079f Fix static build 2023-01-14 12:56:06 +01:00
Grégory Soutadé
1213b34250 Fix ADEPT path creation within adept_activate 2023-01-11 19:57:47 +01:00
Grégory Soutadé
a66dcb959c Work on Makefile 2023-01-11 19:57:47 +01:00
Grégory Soutadé
84b01a5de3 Use system version of pugixml, not a checkouted one 2023-01-08 21:15:33 +01:00
Grégory Soutadé
be78d24236 Add man pages for utils 2023-01-08 21:05:22 +01:00
Grégory Soutadé
8aec5be244 Update Makefile to be more GNU/Linux style 2023-01-08 21:05:04 +01:00
Grégory Soutadé
3a0ab4b438 Update --help for utils and README.md 2023-01-08 21:04:23 +01:00
Grégory Soutadé
891ed05926 We can now specify directly file path for acsmdownloader and adept_remove (-f stille keeped for compatibility) 2023-01-08 20:58:41 +01:00
Grégory Soutadé
ab5afa5003 Add new default ADEPT directories : /home/<user>/.config/adept and $ADEPT_DIR environment variable 2023-01-05 21:29:55 +01:00
Grégory Soutadé
937c27fc23 Fix some warnings 2023-01-05 21:27:50 +01:00
Berwyn
ffd2004cbb Correct 'any book loaned' message 2023-01-04 20:23:57 +01:00
Grégory Soutadé
c41dd46ca7 Check for potential write error (or not buffer fully consumed) 2022-12-23 17:51:51 +01:00
Grégory Soutadé
e4bd73c03d Add global option -D to utils, allowing to specify .adept directory instead of every single files. WARNING : -D has been changed by -d in adept_loan_mgt ! 2022-12-21 21:23:42 +01:00
Grégory Soutadé
e28dc39a68 Make DRMProcessorClient API more consistent 2022-08-29 15:19:23 +02:00
Grégory Soutadé
7b8c7acbad Compute first pass for encryptedKey if keyType attribute is set 2022-08-29 11:57:33 +02:00
Grégory Soutadé
56b3231f92 Add dumpBuffer() in libgourou_common 2022-08-29 11:56:47 +02:00
Grégory Soutadé
7f5b787cb9 Add launcher util for AppImage 2022-08-29 11:56:47 +02:00
Grégory Soutadé
600535d52c Utils: Migration to OpenSSL3 2022-08-29 11:56:47 +02:00
Grégory Soutadé
210b265693 Forward DEBUG flag in Makefile 2022-08-10 21:34:30 +02:00
Grégory Soutadé
33bb983283 Change log levels names to avoid collisions 2022-08-10 21:34:30 +02:00
Grégory Soutadé
22880c71c6 Update Makefile to support separated OpenSSL3 compilation 2022-06-08 12:24:38 +02:00
Grégory Soutadé
4f288f4e24 Add support for OpenSSL 3 2022-06-05 15:29:20 +02:00
Grégory Soutadé
4f9b2de5a5 Remove use of tempnam function and fix bug (bad check of rename return) 2022-04-23 17:41:54 +02:00
Grégory Soutadé
8fe8ba2808 Add adept_loan_mgt util 2022-04-03 09:39:46 +02:00
Grégory Soutadé
2e7e352e35 Utils: use trim functions from libgourou_common.h (avoid code duplication) 2022-04-03 09:29:40 +02:00
Grégory Soutadé
2f2e4e193e Add resume option to acsmdownloader 2022-03-23 21:05:56 +01:00
Grégory Soutadé
e149af9e17 Handle HTTP request connexion fails and download resuming on lost connection during transfer 2022-03-17 21:56:17 +01:00
Grégory Soutadé
1221b2a95a Add optional fd parameter to sendHTTPRequest() in order to directly write received data in a buffer and not in an intermediate buffer 2022-03-17 21:55:02 +01:00
Grégory Soutadé
2ce6142596 Remove QtCore and QtNetwork, replace them by libcurl + libc 2022-03-16 22:45:33 +01:00
Grégory Soutadé
0f475423c0 Add a private option into adept_remove to provide encryption key 2022-03-12 23:04:16 +01:00
Grégory Soutadé
9b946a62b4 ADEPT remove : Don't decrypt XRef stream if there is one 2022-03-12 23:02:55 +01:00
Grégory Soutadé
479869b7f2 Fix a use after free in adept_activate : pass string destroyed too early 2022-02-22 20:58:40 +01:00
Grégory Soutadé
41f1a1e980 Fix a bug in adept_activate : cannot ask for interactive password if output directory already exists 2022-02-22 20:58:36 +01:00
Grégory Soutadé
a97a915bc8 Rework HTTP request loop events (Thanks Milian) and display download progression 2022-02-22 20:58:32 +01:00
Grégory Soutadé
a623a3d796 Skip files with inflate errors during ePub decryption 2022-02-22 20:58:30 +01:00