From 8b61a22f9a388244cfdece5a2816780520aec7f3 Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 5 Sep 2018 22:25:58 -0400 Subject: apply cross-elfc improvements to veracrypt --- veracrypt/vc_include_sysmacros.patch | 11 ++++ veracrypt/veracrypt.spec | 110 +++++++++++++++++++++++++++++++---- 2 files changed, 111 insertions(+), 10 deletions(-) create mode 100644 veracrypt/vc_include_sysmacros.patch (limited to 'veracrypt') diff --git a/veracrypt/vc_include_sysmacros.patch b/veracrypt/vc_include_sysmacros.patch new file mode 100644 index 0000000..9381b40 --- /dev/null +++ b/veracrypt/vc_include_sysmacros.patch @@ -0,0 +1,11 @@ +diff -x '*.orig' -x '*.rej' -Naur VeraCrypt_1.22/src/Platform/Unix/FilesystemPath.cpp VeraCrypt_1.22-1/src/Platform/Unix/FilesystemPath.cpp +--- VeraCrypt_1.22/src/Platform/Unix/FilesystemPath.cpp 2018-03-30 07:54:10.000000000 -0400 ++++ VeraCrypt_1.22-1/src/Platform/Unix/FilesystemPath.cpp 2018-09-05 21:20:12.897225387 -0400 +@@ -15,6 +15,7 @@ + #include "Platform/StringConverter.h" + #include + #include ++#include + + namespace VeraCrypt + { diff --git a/veracrypt/veracrypt.spec b/veracrypt/veracrypt.spec index e59f1c2..3612a71 100644 --- a/veracrypt/veracrypt.spec +++ b/veracrypt/veracrypt.spec @@ -6,28 +6,104 @@ %define license_files src/License.txt %define debug_package %{nil} +# lifted from https://copr-be.cloud.fedoraproject.org/results/scx/veracrypt/fedora-27-x86_64/00657099-veracrypt/veracrypt.spec +%define wx_version_major 3 +%define wx_version_minor 0 +%define wx_version %{wx_version_major}.%{wx_version_minor} + +%define force_wx_gtk2 %{nil} +%define force_wx_gtk2 0 + +%define wx_name_postfix %{nil} +%if 0%{?wx_version_major} >= 3 + %if 0%{?wx_version_minor} == 0 + %define wx_name_postfix %{wx_version_major} + %else + %define wx_name_postfix %{wx_version_major}%{wx_version_minor} + %endif +%endif + +# Force toolkit +# e.g. gtk2 instead of gtk3 +%define wx_toolkit %{nil} +%if 0%{?force_wx_gtk2} + %if 0%{?wx_version_major} >= 3 + %if 0%{?wx_version_minor} == 0 + %define wx_toolkit gtk2 + %endif + %endif +%endif + +%undefine update_mime_database_n +%if 0%{?fedora}%{?rhel} + %define update_mime_database_n 1 +%endif + +%define doc_license %{nil} +%define doc_license 1 +%if 0%{?rhel}%{?fedora} + %if 0%{?rhel} + %if 0%{?rhel} < 7 + %define doc_license 0 + %endif + %else + %if 0%{?fedora} < 19 + %define doc_license 0 + %endif + %endif +%endif + +%define enable_dumpfullversion %{nil} +%define enable_dumpfullversion 0 +%if 0%{?rhel}%{?fedora} + %if 0%{?rhel} + %if 0%{?rhel} > 7 + %define enable_dumpfullversion 1 + %endif + %else + %if 0%{?fedora} > 25 + %define enable_dumpfullversion 1 + %endif + %endif +%endif + Name: veracrypt Version: 1.22 -Release: 1 +Release: 4 Summary: Disk encryption with strong security based on TrueCrypt Group: Applications/File License: Apache License 2.0 and TrueCrypt License 3.0 URL: https://www.veracrypt.fr/ Source0: https://www.veracrypt.fr/code/%{pname}/snapshot/%{pname}_%{version}.tar.gz -# in case upstream ever malfunctions here is my mirror -#Source0: https://gitlab.com/bgstack15/big-sources/raw/master/%{name}/%{pname}_%{version}.tar.gz +#Source0: https://gitlab.com/bgstack15/big-sources/raw/master/%%{name}/%%{pname}_%%{version}.tar.gz +#Source0: https://launchpad.net/veracrypt/trunk/%%{version}/+download/VeraCrypt_%%{version}_Source.tar.bz2 Patch0: vc_fedora.patch Patch1: vc_desktop.patch +Patch2: vc_include_sysmacros.patch Packager: Bgstack15 +%if "%{?wx_toolkit}" != "" +BuildRequires: compat-wxGTK%{?wx_name_postfix}-%{wx_toolkit}-devel +%else +BuildRequires: wxGTK%{?wx_name_postfix}-devel +%endif BuildRequires: gcc-c++ -BuildRequires: wxGTK3-devel BuildRequires: fuse-devel BuildRequires: desktop-file-utils BuildRequires: ImageMagick BuildRequires: yasm -Requires: wxGTK3 +%if 0%{?rhel}%{?fedora} +%if 0%{?rhel} +BuildRequires: ghostscript +%else +BuildRequires: ghostscript-core +%endif +%else +BuildRequires: ghostscript +%endif +# WORKHERE: experiment with not requiring this, explicitly +#Requires: wxGTK3 %description VeraCrypt is a free open source disk encryption software for Windows, Mac OSX and Linux. Brought to you by IDRIX (https://www.idrix.fr) and based on TrueCrypt 7.1a. @@ -37,11 +113,25 @@ VeraCrypt is a free open source disk encryption software for Windows, Mac OSX an %patch0 -p0 %patch1 -p0 +%patch2 -p0 %build -#%make_build -C %{tarballdir}/src +%if 0%{wx_version_major} < 3 +WXCONFIG="wx-config" +%else +WXCONFIG="wx-config-%{wx_version}" +%endif +export WXCONFIG + +%if "%{?wx_toolkit}" != "" +if hash "${WXCONFIG}-%{?wx_toolkit}" >/dev/null 2>&1 ; then + WXCONFIG="${WXCONFIG}-%{?wx_toolkit}" + export WXCONFIG +fi +%endif + pushd %{srcdir} -make %{_smp_mflags} +%{__make} WX_CONFIG="${WXCONFIG}" %{?_smp_mflags} popd %install @@ -73,7 +163,7 @@ test -f %{srcdir}/Setup/Linux/%{name}.desktop && \ # icons pushd %{srcdir}/Resources/Icons -for s in {16,48,128,256} ; +for s in 16 48 128 256 ; do convert "%{pname}-${s}x${s}.xpm" "%{pname}-${s}x${s}.png" && \ %{__install} -p -D -m 0644 "%{pname}-${s}x${s}.png" "%{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/%{name}.png" || : @@ -131,5 +221,5 @@ fi %{_datadir}/icons/hicolor/*/apps/* %changelog -* Sat Sep 1 2018 B Stack 1.22-1 -- Initial rpm built. +* Wed Sep 05 2018 B Stack 1.22-4 +- rebuild rpm -- cgit From ef041484cf223e5c64c6848934c04b315403be2b Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 5 Sep 2018 22:39:36 -0400 Subject: fix license source location --- veracrypt/veracrypt.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'veracrypt') diff --git a/veracrypt/veracrypt.spec b/veracrypt/veracrypt.spec index 3612a71..e532624 100644 --- a/veracrypt/veracrypt.spec +++ b/veracrypt/veracrypt.spec @@ -3,7 +3,7 @@ %global tarballdir %{pname}_%{version} %global srcdir %{tarballdir}/src %global indocdir %{tarballdir}/doc -%define license_files src/License.txt +%define license_files %{srcdir}/License.txt %define debug_package %{nil} # lifted from https://copr-be.cloud.fedoraproject.org/results/scx/veracrypt/fedora-27-x86_64/00657099-veracrypt/veracrypt.spec -- cgit From 3d17f7a4b84915d78da8500560214820411fe45a Mon Sep 17 00:00:00 2001 From: B Stack Date: Thu, 6 Sep 2018 06:34:44 -0400 Subject: attempt to fix license file 1 --- veracrypt/veracrypt.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'veracrypt') diff --git a/veracrypt/veracrypt.spec b/veracrypt/veracrypt.spec index e532624..a417aae 100644 --- a/veracrypt/veracrypt.spec +++ b/veracrypt/veracrypt.spec @@ -92,6 +92,8 @@ BuildRequires: gcc-c++ BuildRequires: fuse-devel BuildRequires: desktop-file-utils BuildRequires: ImageMagick +# need rename +BuildRequires: util-linux BuildRequires: yasm %if 0%{?rhel}%{?fedora} %if 0%{?rhel} @@ -160,6 +162,8 @@ test -f %{srcdir}/Setup/Linux/%{name}.desktop && \ #do # %{__install} -p -D -d %{indocdir}/${thisdir} %{buildroot}%{_defaultdocdir}/%{name}/${thisdir} #done +# rename doc with spaces in name, mostly for user guide +find %{indocdir} -name '* *' ! -regex '.*doc.html.*' -exec rename -v ' ' '_' {} + || : # icons pushd %{srcdir}/Resources/Icons @@ -213,7 +217,7 @@ fi %else %doc %{license_files} %endif -%doc "%{indocdir}/chm/VeraCrypt User Guide.chm" %{indocdir}/EFI-DCS/ %{indocdir}/html/ +%doc "%{indocdir}/chm/VeraCrypt_User_Guide.chm" %{indocdir}/EFI-DCS/ %{indocdir}/html/ %{_bindir}/%{name} #%{_docdir}/%{name} # handled by %doc above? %{_datadir}/applications/*.desktop @@ -221,5 +225,5 @@ fi %{_datadir}/icons/hicolor/*/apps/* %changelog -* Wed Sep 05 2018 B Stack 1.22-4 +* Thu Sep 06 2018 B Stack 1.22-4 - rebuild rpm -- cgit From 873dd6b5e4162a4bb6001f10e9446dec82da2894 Mon Sep 17 00:00:00 2001 From: B Stack Date: Thu, 6 Sep 2018 07:05:40 -0400 Subject: attempt 2 for licensing file --- veracrypt/veracrypt.spec | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'veracrypt') diff --git a/veracrypt/veracrypt.spec b/veracrypt/veracrypt.spec index a417aae..aed875c 100644 --- a/veracrypt/veracrypt.spec +++ b/veracrypt/veracrypt.spec @@ -104,8 +104,6 @@ BuildRequires: ghostscript-core %else BuildRequires: ghostscript %endif -# WORKHERE: experiment with not requiring this, explicitly -#Requires: wxGTK3 %description VeraCrypt is a free open source disk encryption software for Windows, Mac OSX and Linux. Brought to you by IDRIX (https://www.idrix.fr) and based on TrueCrypt 7.1a. @@ -132,16 +130,22 @@ if hash "${WXCONFIG}-%{?wx_toolkit}" >/dev/null 2>&1 ; then fi %endif -pushd %{srcdir} -%{__make} WX_CONFIG="${WXCONFIG}" %{?_smp_mflags} -popd +%if !0%{?dummy_package} + pushd %{srcdir} + %{__make} WX_CONFIG="${WXCONFIG}" %{?_smp_mflags} + popd +%endif %install #%make_install -C %{tarballdir}/src %{__install} -d "%{buildroot}%{_bindir}" +%if !0%{?dummy_package} %{__install} %{srcdir}/Main/veracrypt "%{buildroot}%{_bindir}" +%endif %{__install} -d "%{buildroot}%{_docdir}/%{name}" +%if !0%{?doc_license} %{__install} -m 0644 %{srcdir}/License.txt "%{buildroot}%{_docdir}/%{name}" +%endif %{__install} -d "%{buildroot}%{_datadir}/applications" "%{buildroot}%{_datadir}/pixmaps" %{__install} %{srcdir}/Setup/Linux/%{name}.desktop "%{buildroot}%{_datadir}/applications" %{__install} %{srcdir}/Resources/Icons/VeraCrypt-256x256.xpm "%{buildroot}%{_datadir}/pixmaps/veracrypt.xpm" @@ -162,8 +166,11 @@ test -f %{srcdir}/Setup/Linux/%{name}.desktop && \ #do # %{__install} -p -D -d %{indocdir}/${thisdir} %{buildroot}%{_defaultdocdir}/%{name}/${thisdir} #done -# rename doc with spaces in name, mostly for user guide -find %{indocdir} -name '* *' ! -regex '.*doc.html.*' -exec rename -v ' ' '_' {} + || : +if test -e "%{indocdir}/chm/VeraCrypt User Guide.chm" ; +then + mv "%{indocdir}/chm/VeraCrypt User Guide.chm" "%{indocdir}/chm/VeraCrypt_User_Guide.chm" || : +fi +%{__install} -m 0644 -t %{buildroot}%{_docdir}/%{name} %{indocdir}/chm/VeraCrypt_User_Guide.chm # icons pushd %{srcdir}/Resources/Icons @@ -218,7 +225,9 @@ fi %doc %{license_files} %endif %doc "%{indocdir}/chm/VeraCrypt_User_Guide.chm" %{indocdir}/EFI-DCS/ %{indocdir}/html/ +%if !0%{?dummy_package} %{_bindir}/%{name} +%endif #%{_docdir}/%{name} # handled by %doc above? %{_datadir}/applications/*.desktop %{_datadir}/pixmaps/* -- cgit From b9bbbb6fed8624e3d503c600d3c0de31db867dfd Mon Sep 17 00:00:00 2001 From: B Stack Date: Thu, 6 Sep 2018 08:05:59 -0400 Subject: fix doc on el, part 2 --- veracrypt/veracrypt.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'veracrypt') diff --git a/veracrypt/veracrypt.spec b/veracrypt/veracrypt.spec index aed875c..a8dad81 100644 --- a/veracrypt/veracrypt.spec +++ b/veracrypt/veracrypt.spec @@ -67,6 +67,11 @@ %endif %endif +%define doctarget %{_docdir}/%{name} +%if 0%{?rhel} + %define %{doctarget} %{_docdir}/%{name}-%{version} +%endif + Name: veracrypt Version: 1.22 Release: 4 @@ -170,7 +175,7 @@ if test -e "%{indocdir}/chm/VeraCrypt User Guide.chm" ; then mv "%{indocdir}/chm/VeraCrypt User Guide.chm" "%{indocdir}/chm/VeraCrypt_User_Guide.chm" || : fi -%{__install} -m 0644 -t %{buildroot}%{_docdir}/%{name} %{indocdir}/chm/VeraCrypt_User_Guide.chm +%{__install} -D -m 0644 -t %{buildroot}%{doctarget} %{indocdir}/chm/VeraCrypt_User_Guide.chm # icons pushd %{srcdir}/Resources/Icons @@ -224,7 +229,7 @@ fi %else %doc %{license_files} %endif -%doc "%{indocdir}/chm/VeraCrypt_User_Guide.chm" %{indocdir}/EFI-DCS/ %{indocdir}/html/ +%doc %{indocdir}/chm/VeraCrypt_User_Guide.chm %{indocdir}/EFI-DCS/ %{indocdir}/html/ %if !0%{?dummy_package} %{_bindir}/%{name} %endif -- cgit From 6fe9686a4e4561e96fda97cafcfbae8683a37c70 Mon Sep 17 00:00:00 2001 From: B Stack Date: Thu, 6 Sep 2018 08:17:23 -0400 Subject: fix part 3 --- veracrypt/veracrypt.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'veracrypt') diff --git a/veracrypt/veracrypt.spec b/veracrypt/veracrypt.spec index a8dad81..b81fe87 100644 --- a/veracrypt/veracrypt.spec +++ b/veracrypt/veracrypt.spec @@ -69,7 +69,7 @@ %define doctarget %{_docdir}/%{name} %if 0%{?rhel} - %define %{doctarget} %{_docdir}/%{name}-%{version} + %define doctarget %{_docdir}/%{name}-%{version} %endif Name: veracrypt -- cgit From 4d275d305bdd611f8fa25dfc1c7d61ecff3c3115 Mon Sep 17 00:00:00 2001 From: B Stack Date: Thu, 6 Sep 2018 08:34:40 -0400 Subject: fix part 4 --- veracrypt/veracrypt.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'veracrypt') diff --git a/veracrypt/veracrypt.spec b/veracrypt/veracrypt.spec index b81fe87..c850fc4 100644 --- a/veracrypt/veracrypt.spec +++ b/veracrypt/veracrypt.spec @@ -175,7 +175,8 @@ if test -e "%{indocdir}/chm/VeraCrypt User Guide.chm" ; then mv "%{indocdir}/chm/VeraCrypt User Guide.chm" "%{indocdir}/chm/VeraCrypt_User_Guide.chm" || : fi -%{__install} -D -m 0644 -t %{buildroot}%{doctarget} %{indocdir}/chm/VeraCrypt_User_Guide.chm +%{__install} -d "%{buildroot}%{doctarget}" +%{__install} -D -m 0644 %{indocdir}/chm/VeraCrypt_User_Guide.chm %{buildroot}%{doctarget} # icons pushd %{srcdir}/Resources/Icons -- cgit From 6fb0cd964f5c61ce6e4b2418bad5767047632ba7 Mon Sep 17 00:00:00 2001 From: B Stack Date: Thu, 6 Sep 2018 08:45:01 -0400 Subject: fix part 5 --- veracrypt/veracrypt.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'veracrypt') diff --git a/veracrypt/veracrypt.spec b/veracrypt/veracrypt.spec index c850fc4..0d9ef35 100644 --- a/veracrypt/veracrypt.spec +++ b/veracrypt/veracrypt.spec @@ -149,11 +149,11 @@ fi %endif %{__install} -d "%{buildroot}%{_docdir}/%{name}" %if !0%{?doc_license} -%{__install} -m 0644 %{srcdir}/License.txt "%{buildroot}%{_docdir}/%{name}" +%{__install} -m 0644 %{srcdir}/License.txt "%{buildroot}%{doctarget}" %endif %{__install} -d "%{buildroot}%{_datadir}/applications" "%{buildroot}%{_datadir}/pixmaps" %{__install} %{srcdir}/Setup/Linux/%{name}.desktop "%{buildroot}%{_datadir}/applications" -%{__install} %{srcdir}/Resources/Icons/VeraCrypt-256x256.xpm "%{buildroot}%{_datadir}/pixmaps/veracrypt.xpm" +%{__install} %{srcdir}/Resources/Icons/%{pname}-256x256.xpm "%{buildroot}%{_datadir}/pixmaps/%{name}.xpm" # cleanup -- cgit From 5294cacb2f6976a8fae47cd2a56822e9379f59a3 Mon Sep 17 00:00:00 2001 From: B Stack Date: Thu, 6 Sep 2018 09:03:53 -0400 Subject: part 5 --- veracrypt/veracrypt.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'veracrypt') diff --git a/veracrypt/veracrypt.spec b/veracrypt/veracrypt.spec index 0d9ef35..164f57d 100644 --- a/veracrypt/veracrypt.spec +++ b/veracrypt/veracrypt.spec @@ -175,7 +175,7 @@ if test -e "%{indocdir}/chm/VeraCrypt User Guide.chm" ; then mv "%{indocdir}/chm/VeraCrypt User Guide.chm" "%{indocdir}/chm/VeraCrypt_User_Guide.chm" || : fi -%{__install} -d "%{buildroot}%{doctarget}" +! test -d "%{buildroot}%{doctarget}" && %{__install} -d "%{buildroot}%{doctarget}" || : %{__install} -D -m 0644 %{indocdir}/chm/VeraCrypt_User_Guide.chm %{buildroot}%{doctarget} # icons -- cgit From 8dc8a8a2d2da22c9ae90d2935b3cc6d613284ffc Mon Sep 17 00:00:00 2001 From: B Stack Date: Thu, 6 Sep 2018 10:07:22 -0400 Subject: now fixed, just cleaning up --- veracrypt/veracrypt.spec | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'veracrypt') diff --git a/veracrypt/veracrypt.spec b/veracrypt/veracrypt.spec index 164f57d..43ea177 100644 --- a/veracrypt/veracrypt.spec +++ b/veracrypt/veracrypt.spec @@ -97,18 +97,12 @@ BuildRequires: gcc-c++ BuildRequires: fuse-devel BuildRequires: desktop-file-utils BuildRequires: ImageMagick -# need rename BuildRequires: util-linux BuildRequires: yasm -%if 0%{?rhel}%{?fedora} -%if 0%{?rhel} BuildRequires: ghostscript -%else +%if 0%{?fedora} BuildRequires: ghostscript-core %endif -%else -BuildRequires: ghostscript -%endif %description VeraCrypt is a free open source disk encryption software for Windows, Mac OSX and Linux. Brought to you by IDRIX (https://www.idrix.fr) and based on TrueCrypt 7.1a. @@ -165,12 +159,7 @@ test -f %{srcdir}/Setup/Linux/%{name}.desktop && \ # none # man pages -# handled by the %files %doc directive? # not really man pages in this case, just html and text -#for thisdir in $( find %{indocdir} -mindepth 1 -maxdepth 1 -printf '%f\n' ) ; -#do -# %{__install} -p -D -d %{indocdir}/${thisdir} %{buildroot}%{_defaultdocdir}/%{name}/${thisdir} -#done if test -e "%{indocdir}/chm/VeraCrypt User Guide.chm" ; then mv "%{indocdir}/chm/VeraCrypt User Guide.chm" "%{indocdir}/chm/VeraCrypt_User_Guide.chm" || : -- cgit