From a693db0c29152000062f1c5ea214f693f737c90b Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Thu, 25 Oct 2018 10:56:09 -0400 Subject: [PATCH] Add Debian packaging. --- debian/changelog | 5 + debian/ciphershed.default | 9 + debian/ciphershed.desktop | 22 + debian/ciphershed.doc-base | 8 + debian/ciphershed.docs | 1 + debian/ciphershed.init | 56 ++ debian/ciphershed.install | 6 + debian/ciphershed.manpages | 1 + debian/ciphershed.xml | 7 + debian/compat | 1 + debian/control | 36 ++ debian/copyright | 592 ++++++++++++++++++++ debian/gbp.conf | 7 + debian/patches/001-user-guide-location.diff | 22 + debian/patches/002-no-preference-x.diff | 20 + debian/patches/003-file-manager.diff | 55 ++ debian/patches/004-indicator-support.diff | 190 +++++++ debian/patches/series | 4 + debian/prerm | 20 + debian/rules | 33 ++ debian/scripts/30ciphershed | 19 + debian/scripts/ciphershed | 17 + debian/source/format | 1 + debian/watch | 2 + 24 files changed, 1134 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/ciphershed.default create mode 100644 debian/ciphershed.desktop create mode 100644 debian/ciphershed.doc-base create mode 100644 debian/ciphershed.docs create mode 100644 debian/ciphershed.init create mode 100644 debian/ciphershed.install create mode 100644 debian/ciphershed.manpages create mode 100644 debian/ciphershed.xml create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/gbp.conf create mode 100644 debian/patches/001-user-guide-location.diff create mode 100644 debian/patches/002-no-preference-x.diff create mode 100644 debian/patches/003-file-manager.diff create mode 100644 debian/patches/004-indicator-support.diff create mode 100644 debian/patches/series create mode 100644 debian/prerm create mode 100755 debian/rules create mode 100755 debian/scripts/30ciphershed create mode 100755 debian/scripts/ciphershed create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..d057b9e7 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +ciphershed (0.7.5.1-0vanir1) UNRELEASED; urgency=medium + + * Initial release. + + -- Unit 193 Wed, 24 Oct 2018 19:34:45 -0400 diff --git a/debian/ciphershed.default b/debian/ciphershed.default new file mode 100644 index 00000000..2ace5134 --- /dev/null +++ b/debian/ciphershed.default @@ -0,0 +1,9 @@ +# If enabled, the following option calls 'ciphershed -d' at shutdown. Although +# all filesystems are unmounted automatically at shutdown, only calling +# 'ciphershed -d' will stop the CipherShed processes and remove any device mappings. +# It probably isn't necessary to do this, but it shouldn't hurt. + +CIPHERSHED_SHUTDOWN_UNMOUNT="yes" + +# If enabled, the following option calls 'ciphershed -d' during suspend and hibernate. +CIPHERSHED_SUSPEND_UNMOUNT="yes" diff --git a/debian/ciphershed.desktop b/debian/ciphershed.desktop new file mode 100644 index 00000000..4bccdc33 --- /dev/null +++ b/debian/ciphershed.desktop @@ -0,0 +1,22 @@ +[Desktop Entry] +Type=Application +Name=CipherShed +GenericName=CipherShed volume manager +Comment=Create and mount CipherShed encrypted volumes +Icon=ciphershed +Exec=ciphershed %f +Categories=Security;Utility;Filesystem +Keywords=encryption,filesystem +Terminal=false +X-Ayatana-Desktop-Shortcuts=MountFavorites;DismountAll +MimeType=application/x-truecrypt-volume; + +[MountFavorites Shortcut Group] +Name=Mount All Favorite Volumes +Exec=/usr/bin/ciphershed --auto-mount=favorites +TargetEnvironment=Unity + +[DismountAll Shortcut Group] +Name=Dismount All Mounted Volumes +Exec=/usr/bin/ciphershed --dismount +TargetEnvironment=Unity diff --git a/debian/ciphershed.doc-base b/debian/ciphershed.doc-base new file mode 100644 index 00000000..e8cbe515 --- /dev/null +++ b/debian/ciphershed.doc-base @@ -0,0 +1,8 @@ +Document: ciphershed +Title: CipherShed User's Guide +Author: TrueCrypt Foundation +Abstract: This is the user manual for CipherShed, an encryption tool. +Section: System/Security + +Format: PDF +Files: /usr/share/doc/ciphershed/user_guide.pdf diff --git a/debian/ciphershed.docs b/debian/ciphershed.docs new file mode 100644 index 00000000..a59e4324 --- /dev/null +++ b/debian/ciphershed.docs @@ -0,0 +1 @@ +user_guide.pdf diff --git a/debian/ciphershed.init b/debian/ciphershed.init new file mode 100644 index 00000000..44cebbc0 --- /dev/null +++ b/debian/ciphershed.init @@ -0,0 +1,56 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: ciphershed +# Required-Start: +# Required-Stop: $remote_fs +# Should-Start: +# Should-Stop: +# Default-Start: +# Default-Stop: 0 1 6 +# Short-Description: Remove remaining CipherShed device mappings. +# Description: This init script will dismount mounted CipherShed partitions before shutdown. +### END INIT INFO + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +CIPHERSHED_SHUTDOWN_UNMOUNT="yes" + +. /lib/lsb/init-functions + +[ -x /usr/bin/ciphershed ] || exit 0 + +if [ -r /etc/default/ciphershed ]; then + . /etc/default/ciphershed +fi + +case "${CIPHERSHED_SHUTDOWN_UNMOUNT}" in +[Nn]*) + exit 0 + ;; +esac + +do_stop() +{ + log_action_begin_msg "Removing CipherShed device mappings" + ciphershed -d + log_action_end_msg $? +} + +case "$1" in + start) + # No-op + ;; + status) + ciphershed --list + ;; + restart|reload|force-reload) + # No-op + ;; + stop) + do_stop + ;; + *) + echo "Usage: $0 stop|status" >&2 + exit 3 + ;; +esac + diff --git a/debian/ciphershed.install b/debian/ciphershed.install new file mode 100644 index 00000000..59fb4056 --- /dev/null +++ b/debian/ciphershed.install @@ -0,0 +1,6 @@ +ciphershed.xpm usr/share/pixmaps/ +debian/ciphershed.desktop usr/share/applications/ +debian/ciphershed.xml usr/share/mime/packages/ +debian/scripts/30ciphershed usr/lib/pm-utils/sleep.d/ +debian/scripts/ciphershed lib/systemd/system-sleep/ +src/Main/ciphershed usr/bin/ diff --git a/debian/ciphershed.manpages b/debian/ciphershed.manpages new file mode 100644 index 00000000..5165f018 --- /dev/null +++ b/debian/ciphershed.manpages @@ -0,0 +1 @@ +src/Main/man/ciphershed.1 diff --git a/debian/ciphershed.xml b/debian/ciphershed.xml new file mode 100644 index 00000000..2e817554 --- /dev/null +++ b/debian/ciphershed.xml @@ -0,0 +1,7 @@ + + + + TrueCrypt Volume + + + diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..b4de3947 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +11 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..0ba31782 --- /dev/null +++ b/debian/control @@ -0,0 +1,36 @@ +Source: ciphershed +Section: non-free/utils +Priority: optional +Maintainer: Unit 193 +Build-Depends: debhelper (>= 11), + imagemagick, + libayatana-appindicator-dev | libappindicator-dev, + libfuse-dev, + libopencryptoki-dev, + libwxgtk3.0-dev, + nasm [any-i386 any-amd64], + perl, + pkg-config +Standards-Version: 4.2.1 +Homepage: https://www.ciphershed.org/ + +Package: ciphershed +Architecture: any +Depends: + dmsetup, + kmod, + lsb-base, + sudo, + ${misc:Depends}, + ${shlibs:Depends} +Recommends: + exfat-utils, + ntfs-3g, + xdg-utils +Description: Cross-platform on-the-fly encryption + CipherShed provides cross-platform on-the-fly encryption for Linux, MacOS X and + Windows. It can encrypt filesystems stored either within a file or on disk + partitions. Supported encryption algorithms include AES, Serpent and Twofish. + The current version uses the XTS mode of disk encryption. In addition, + CipherShed supports "hidden volumes" - unidentifiable volumes present in the + free-space of a CipherShed volume. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..88125ded --- /dev/null +++ b/debian/copyright @@ -0,0 +1,592 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ciphershed +Source: https://github.com/CipherShed/ciphershed +Comment: TC-3.0 license is distribution encumbered. + +Files: * +Copyright: 2003-2011, TrueCrypt Developers Association + 2014, The CipherShed Project +License: TC-3.0 or Apache-2.0 +Comment: + Modifications and additions to the original source code are copyright IDRIX + and are governed by the Apache License 2.0. + +Files: src/Crypto/Whirlpool.c +Copyright: Paulo S. L. M. Barreto + Vincent Rijmen +License: public-domain + THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: src/Common/Apidrvr.h + src/Common/Cache.* + src/Common/Cmdline.* + src/Common/Combo.* + src/Common/Crc.* + src/Common/Crypto.* + src/Common/Dlgcode.* + src/Common/Endian.* + src/Common/Fat.* + src/Common/Format.* + src/Common/Password.* + src/Common/Pkcs5.* + src/Common/Progress.* + src/Common/Random.* + src/Common/Tcdefs.h + src/Common/Tests.* + src/Common/Volumes.* + src/Core/FatFormatter.cpp + src/Driver/Ntdriver.* + src/Driver/Ntvol.* + src/Format/Tcformat.* + src/Mount/Mount.* + src/Setup/Dir.* + src/Setup/Setup.* + src/Setup/Wizard.* +Copyright: 1998-2000, Paul Le Roux +License: E4M + +Files: src/Common/GfMul.c + src/Common/GfMul.h + src/Crypto/Aescrypt.c + src/Crypto/Aes.h + src/Crypto/Aeskey.c + src/Crypto/Aesopt.h + src/Crypto/AesSmall.c + src/Crypto/AesSmall.h + src/Crypto/AesSmall_x86.asm + src/Crypto/Aestab.c + src/Crypto/Aestab.h + src/Crypto/Aes_x64.asm + src/Crypto/Aes_x86.asm + src/Crypto/Sha2.c + src/Crypto/Sha2.h + src/Crypto/Twofish.c +Copyright: 1998-2007, Brian Gladman, Worcester, UK +License: BSD-3-Clause + +Files: src/Boot/Windows/Decompressor.c +Copyright: 2002-2004, Mark Adler +License: zlib + +Files: debian/* +Copyright: 2013-2018, Unit 193 +License: BSD-3-Clause + + + +License: TC-3.0 + TrueCrypt License Version 3.0 + . + Software distributed under this license is distributed on an "AS + IS" BASIS WITHOUT WARRANTIES OF ANY KIND. THE AUTHORS AND + DISTRIBUTORS OF THE SOFTWARE DISCLAIM ANY LIABILITY. ANYONE WHO + USES, COPIES, MODIFIES, OR (RE)DISTRIBUTES ANY PART OF THE + SOFTWARE IS, BY SUCH ACTION(S), ACCEPTING AND AGREEING TO BE + BOUND BY ALL TERMS AND CONDITIONS OF THIS LICENSE. IF YOU DO NOT + ACCEPT THEM, DO NOT USE, COPY, MODIFY, NOR (RE)DISTRIBUTE THE + SOFTWARE, NOR ANY PART(S) THEREOF. + . + I. Definitions + . + 1. "This Product" means the work (including, but not limited to, + source code, graphics, texts, and accompanying files) made + available under and governed by this version of this license + ("License"), as may be indicated by, but is not limited to, + copyright notice(s) attached to or included in the work. + . + 2. "You" means (and "Your" refers to) an individual or a legal + entity (e.g., a non-profit organization, commercial + organization, government agency, etc.) exercising permissions + granted by this License. + . + 3. "Modification" means (and "modify" refers to) any alteration + of This Product, including, but not limited to, addition to or + deletion from the substance or structure of This Product, + translation into another language, repackaging, alteration or + removal of any file included with This Product, and addition of + any new files to This Product. + . + 4. "Your Product" means This Product modified by You, or any + work You derive from (or base on) any part of This Product. In + addition, "Your Product" means any work in which You include any + (modified or unmodified) portion of This Product. However, if + the work in which you include it is an aggregate software + distribution (such as an operating system distribution or a + cover CD-ROM of a magazine) containing multiple separate + products, then the term "Your Product" includes only those + products (in the aggregate software distribution) that use, + include, or depend on a modified or unmodified version of This + Product (and the term "Your Product" does not include the whole + aggregate software distribution). For the purposes of this + License, a product suite consisting of two or more products is + considered a single product (operating system distributions and + cover media of magazines are not considered product suites). + . + 5. "Distribution" means (and "distribute" refers to), regardless + of means or methods, conveyance, transfer, providing, or making + available of This/Your Product or portions thereof to third + parties (including, but not limited to, making This/Your + Product, or portions thereof, available for download to third + parties, whether or not any third party has downloaded the + product, or any portion thereof, made available for download). + . + . + II. Use, Copying, and Distribution of This Product + 0. 1. Provided that You comply with all applicable terms and + conditions of this License, You may make copies of This Product + (unmodified) and distribute copies of This Product (unmodified) + that are not included in another product forming Your Product + (except as permitted under Chapter III). Note: For terms and + conditions for copying and distribution of modified versions of + This Product, see Chapter III. + . + 2. Provided that You comply with all applicable terms and + conditions of this License, You may use This Product freely (see + also Chapter III) on any number of computers/systems for non- + commercial and/or commercial purposes. + . + . + III. Modification, Derivation, and Inclusion in Other Products + . + 1. If all conditions specified in the following paragraphs in + this Chapter (III) are met (for exceptions, see Section III.2) + and if You comply with all other applicable terms and conditions + of this License, You may modify This Product (thus forming Your + Product), derive new works from This Product or portions thereof + (thus forming Your Product), include This Product or portions + thereof in another product (thus forming Your Product, unless + defined otherwise in Chapter I), and You may use (for non- + commercial and/or commercial purposes), copy, and/or distribute + Your Product. + . + a. The name of Your Product (or of Your modified version of + This Product) must not contain the name TrueCrypt (for + example, the following names are not allowed: TrueCrypt, + TrueCrypt+, TrueCrypt Professional, iTrueCrypt, etc.) nor + any other names confusingly similar to the name TrueCrypt + (e.g., True-Crypt, True Crypt, TruKrypt, etc.) + . + Note: TrueCrypt and the TrueCrypt logo are registered + trademarks. The goal is not to monetize the name or the + product, but to protect the reputation of TrueCrypt, and to + prevent support issues and other kinds of issues that might + arise from the existence of similar products with the same + or similar name. Even though TrueCrypt and the TrueCrypt + logo are trademarks, TrueCrypt is and will remain + open-source and free software. + . + All occurrences of the name TrueCrypt that could reasonably + be considered to identify Your Product must be removed from + Your Product and from any associated materials. Logo(s) + included in (or attached to) Your Product (and in/to + associated materials) must not incorporate and must not be + confusingly similar to any of the TrueCrypt logos + (including, but not limited to, the non-textual logo + consisting primarily of a key in stylized form) or + portion(s) thereof. All graphics contained in This Product + (logos, icons, etc.) must be removed from Your Product (or + from Your modified version of This Product) and from any + associated materials. + . + b. The following phrases must be removed from Your Product + and from any associated materials, except the text of this + License: "A TrueCrypt Foundation Release", "Released by + TrueCrypt Foundation", "This is a TrueCrypt Foundation + release." + . + c. Phrase "Based on TrueCrypt, freely available at + http://www.truecrypt.org/" must be displayed by Your Product + (if technically feasible) and contained in its + documentation. Alternatively, if This Product or its portion + You included in Your Product constitutes only a minor + portion of Your Product, phrase "Portions of this product + are based in part on TrueCrypt, freely available at + http://www.truecrypt.org/" may be displayed instead. In each + of the cases mentioned above in this paragraph, + "http://www.truecrypt.org/" must be a hyperlink (if + technically feasible) pointing to http://www.truecrypt.org/ + and You may freely choose the location within the user + interface (if there is any) of Your Product (e.g., an + "About" window, etc.) and the way in which Your Product will + display the respective phrase. + . + Your Product (and any associated materials, e.g., the + documentation, the content of the official web site of Your + Product, etc.) must not present any Internet address + containing the domain name truecrypt.org (or any domain name + that forwards to the domain name truecrypt.org) in a manner + that might suggest that it is where information about Your + Product may be obtained or where bugs found in Your Product + may be reported or where support for Your Product may be + available or otherwise attempt to indicate that the domain + name truecrypt.org is associated with Your Product. + . + d. The complete source code of Your Product must be freely + and publicly available (for exceptions, see Section III.2) + at least until You cease to distribute Your Product. This + condition can be met in one or both of the following ways: + (i) You include the complete source code of Your Product + with every copy of Your Product that You make and distribute + and You make all such copies of Your Product available to + the general public free of charge, and/or (ii) You include + information (valid and correct at least until You cease to + distribute Your Product) about where the complete source + code of Your Product can be obtained free of charge (e.g., + an Internet address) or for a reasonable reproduction fee + with every copy of Your Product that You make and distribute + and, if there is a web site officially associated with Your + Product, You include the aforementioned information about + the source code on a freely and publicly accessible web + page to which such web site links via an easily viewable + hyperlink (at least until You cease to distribute Your + Product). + . + The source code of Your Product must not be deliberately + obfuscated and it must not be in an intermediate form (e.g., + the output of a preprocessor). Source code means the + preferred form in which a programmer would usually modify + the program. + . + Portions of the source code of Your Product not contained in + This Product (e.g., portions added by You in creating Your + Product, whether created by You or by third parties) must be + available under license(s) that (however, see also + Subsection III.1.e) allow(s) anyone to modify and derive new + works from the portions of the source code that are not + contained in This Product and to use, copy, and redistribute + such modifications and/or derivative works. The license(s) + must be perpetual, non-exclusive, royalty-free, no-charge, + and worldwide, and must not invalidate, weaken, restrict, + interpret, amend, modify, interfere with or otherwise affect + any part, term, provision, or clause of this License. The + text(s) of the license(s) must be included with every copy + of Your Product that You make and distribute. + . + Note: If you cannot comply with the above requirements, you + may contact licensing@truecrypt.org. + . + e. You must not change the license terms of This Product in + any way (adding any new terms is considered changing the + license terms even if the original terms are retained), + which means, e.g., that no part of This Product may be put + under another license. You must keep intact all the legal + notices contained in the source code files. You must include + the following items with every copy of Your Product that You + make and distribute: a clear and conspicuous notice stating + that Your Product or portion(s) thereof is/are governed by + this version of the TrueCrypt License, a verbatim copy of + this version of the TrueCrypt License (as contained herein), + a clear and conspicuous notice containing information about + where the included copy of the License can be found, and an + appropriate copyright notice. + . + 2. You are not obligated to comply with Subsection III.1.d if + Your Product is not distributed (i.e., Your Product is available + only to You). + . + Note: If you cannot comply with Subsection III.1.d, you may + contact licensing@truecrypt.org. + . + . + IV. Disclaimer of Liability, Disclaimer of Warranty, + Indemnification + . + You expressly acknowledge and agree to the following: + . + 1. IN NO EVENT WILL ANY (CO)AUTHOR OF THIS PRODUCT, OR ANY + APPLICABLE COPYRIGHT/TRADEMARK OWNER, OR ANY OTHER PARTY WHO MAY + COPY AND/OR (RE)DISTRIBUTE THIS PRODUCT OR PORTIONS THEREOF, AS + MAY BE PERMITTED HEREIN, BE LIABLE TO YOU OR TO ANY OTHER PARTY + FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, ANY DIRECT, + INDIRECT, GENERAL, SPECIAL, INCIDENTAL, PUNITIVE, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, CORRUPTION + OR LOSS OF DATA, ANY LOSSES SUSTAINED BY YOU OR THIRD PARTIES, A + FAILURE OF THIS PRODUCT TO OPERATE WITH ANY OTHER PRODUCT, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR BUSINESS + INTERRUPTION), WHETHER IN CONTRACT, STRICT LIABILITY, TORT + (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE) OR OTHERWISE, + ARISING OUT OF THE USE, COPYING, MODIFICATION, OR + (RE)DISTRIBUTION OF THIS PRODUCT (OR A PORTION THEREOF) OR OF + YOUR PRODUCT (OR A PORTION THEREOF), OR INABILITY TO USE THIS + PRODUCT (OR A PORTION THEREOF), EVEN IF SUCH DAMAGES (OR THE + POSSIBILITY OF SUCH DAMAGES) ARE/WERE PREDICTABLE OR KNOWN TO + ANY (CO)AUTHOR, COPYRIGHT/TRADEMARK OWNER, OR ANY OTHER PARTY. + . + 2. THIS PRODUCT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY + KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT + LIMITED TO, THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE ENTIRE RISK AS TO + THE QUALITY AND PERFORMANCE OF THIS PRODUCT IS WITH YOU. SHOULD + THIS PRODUCT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL + NECESSARY SERVICING, REPAIR, OR CORRECTION. + . + 3. THIS PRODUCT MAY INCORPORATE IMPLEMENTATIONS OF CRYPTOGRAPHIC + ALGORITHMS THAT ARE REGULATED (E.G., SUBJECT TO EXPORT/IMPORT + CONTROL REGULATIONS) OR ILLEGAL IN SOME COUNTRIES. IT IS SOLELY + YOUR RESPONSIBILITY TO VERIFY THAT IT IS LEGAL TO IMPORT AND/OR + (RE)EXPORT AND/OR USE THIS PRODUCT (OR PORTIONS THEREOF) IN + COUNTRIES WHERE YOU INTEND TO USE IT AND/OR TO WHICH YOU INTEND + TO IMPORT IT AND/OR FROM WHICH YOU INTEND TO EXPORT IT, AND IT + IS SOLELY YOUR RESPONSIBILITY TO COMPLY WITH ANY APPLICABLE + REGULATIONS, RESTRICTIONS, AND LAWS. + . + 4. YOU SHALL INDEMNIFY, DEFEND AND HOLD ALL (CO)AUTHORS OF THIS + PRODUCT, AND APPLICABLE COPYRIGHT/TRADEMARK OWNERS, HARMLESS + FROM AND AGAINST ANY AND ALL LIABILITY, DAMAGES, LOSSES, + SETTLEMENTS, PENALTIES, FINES, COSTS, EXPENSES (INCLUDING + REASONABLE ATTORNEYS' FEES), DEMANDS, CAUSES OF ACTION, CLAIMS, + ACTIONS, PROCEEDINGS, AND SUITS, DIRECTLY RELATED TO OR ARISING + OUT OF YOUR USE, INABILITY TO USE, COPYING, (RE)DISTRIBUTION, + IMPORT AND/OR (RE)EXPORT OF THIS PRODUCT (OR PORTIONS THEREOF) + AND/OR YOUR BREACH OF ANY TERM OF THIS LICENSE. + . + . + V. Trademarks + . + This License does not grant permission to use trademarks + associated with (or applying to) This Product, except for fair + use as defined by applicable law and except for use expressly + permitted or required by this License. Any attempt otherwise to + use trademarks associated with (or applying to) This Product + automatically and immediately terminates Your rights under This + License and may constitute trademark infringement (which may be + prosecuted). + . + TrueCrypt is a trademark registered with the World Intellectual + Property Organization, an agency of the United Nations, + (international trademark registration), in the U.S. Patent and + Trademark Office, and in the trademark offices of other + countries. All TrueCrypt logos are trademarks and the + non-textual TrueCrypt logo consisting primarily of a key in + stylized form is a trademark registered in the U.S. Patent and + Trademark Office. + . + Note: The goal is not to monetize the name or the product, but + to protect the reputation of TrueCrypt. TrueCrypt is and will + remain open-source and free software. + . + . + VI. General Terms and Conditions, Miscellaneous Provisions + . + 1. ANYONE WHO USES AND/OR COPIES AND/OR MODIFIES AND/OR CREATES + DERIVATIVE WORKS OF AND/OR (RE)DISTRIBUTES THIS PRODUCT, OR ANY + PORTION(S) THEREOF, IS, BY SUCH ACTION(S), AGREEING TO BE BOUND + BY AND ACCEPTING ALL TERMS AND CONDITIONS OF THIS LICENSE (AND + THE RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS LICENSE). + IF YOU DO NOT ACCEPT (AND AGREE TO BE BOUND BY) ALL TERMS AND + CONDITIONS OF THIS LICENSE, DO NOT USE, COPY, MODIFY, CREATE + DERIVATIVE WORKS OF, NOR (RE)DISTRIBUTE THIS PRODUCT, NOR ANY + PORTION(S) THEREOF. + . + 2. YOU MAY NOT USE, MODIFY, COPY, CREATE DERIVATIVE WORKS OF, + (RE)DISTRIBUTE, OR SUBLICENSE THIS PRODUCT, OR PORTION(S) + THEREOF, EXCEPT AS EXPRESSLY PROVIDED IN THIS LICENSE (EVEN IF + APPLICABLE LAW GIVES YOU MORE RIGHTS). ANY ATTEMPT (EVEN IF + PERMITTED BY APPLICABLE LAW) OTHERWISE TO USE, MODIFY, COPY, + CREATE DERIVATIVE WORKS OF, (RE)DISTRIBUTE, OR SUBLICENSE THIS + PRODUCT, OR PORTION(S) THEREOF, AUTOMATICALLY AND IMMEDIATELY + TERMINATES YOUR RIGHTS UNDER THIS LICENSE AND CAN CONSTITUTE + COPYRIGHT INFRINGEMENT (WHICH MAY BE PROSECUTED). ANY CONDITIONS + AND RESTRICTIONS CONTAINED IN THIS LICENSE ARE ALSO LIMITATIONS + ON THE SCOPE OF THIS LICENSE AND ALSO DEFINE THE SCOPE OF YOUR + RIGHTS UNDER THIS LICENSE. YOUR FAILURE TO COMPLY WITH THE TERMS + AND CONDITIONS OF THIS LICENSE OR FAILURE TO PERFORM ANY + APPLICABLE OBLIGATION IMPOSED BY THIS LICENSE AUTOMATICALLY AND + IMMEDIATELY TERMINATES YOUR RIGHTS UNDER THIS LICENSE AND CAN + CAUSE OR BE CONSIDERED COPYRIGHT INFRINGEMENT (WHICH MAY BE + PROSECUTED). NOTHING IN THIS LICENSE SHALL IMPLY OR BE CONSTRUED + AS A PROMISE, OBLIGATION, OR COVENANT NOT TO SUE FOR COPYRIGHT + OR TRADEMARK INFRINGEMENT IF YOU DO NOT COMPLY WITH THE TERMS + AND CONDITIONS OF THIS LICENSE. + . + 3. This License does not constitute or imply a waiver of any + intellectual property rights except as may be otherwise + expressly provided in this License. This License does not + transfer, assign, or convey any intellectual property rights + (e.g., it does not transfer ownership of copyrights or + trademarks). + . + 4. Subject to the terms and conditions of this License, You may + allow a third party to use Your copy of This Product (or a copy + that You make and distribute, or Your Product) provided that the + third party explicitly accepts and agrees to be bound by all + terms and conditions of this License and the third party is not + prohibited from using This Product (or portions thereof) by this + License (see, e.g., Section VI.7) or by applicable law. However, + You are not obligated to ensure that the third party accepts + (and agrees to be bound by all terms of) this License if You + distribute only the self-extracting package (containing This + Product) that does not allow the user to install (nor extract) + the files contained in the package until he or she accepts and + agrees to be bound by all terms and conditions of this License. + . + 5. Without specific prior written permission from the authors of + This Product (or from their common representative), You must not + use the name of This Product, the names of the authors of This + Product, or the names of the legal entities (or informal groups) + of which the authors were/are members/employees, to endorse or + promote Your Product or any work in which You include a modified + or unmodified version of This Product, or to endorse or promote + You or Your affiliates, or in a way that might suggest that Your + Product (or any work in which You include a modified or + unmodified version of This Product), You, or Your affiliates + is/are endorsed by one or more authors of This Product, or in a + way that might suggest that one or more authors of This Product + is/are affiliated with You (or Your affiliates) or directly + participated in the creation of Your Product or of any work in + which You include a modified or unmodified version of This + Product. + . + 6. IF YOU ARE NOT SURE WHETHER YOU UNDERSTAND ALL PARTS OF THIS + LICENSE OR IF YOU ARE NOT SURE WHETHER YOU CAN COMPLY WITH ALL + TERMS AND CONDITIONS OF THIS LICENSE, YOU MUST NOT USE, COPY, + MODIFY, CREATE DERIVATIVE WORKS OF, NOR (RE)DISTRIBUTE THIS + PRODUCT, NOR ANY PORTION(S) OF IT. YOU SHOULD CONSULT WITH A + LAWYER. + . + 7. IF (IN RELEVANT CONTEXT) ANY PROVISION OF CHAPTER IV OF THIS + LICENSE IS UNENFORCEABLE, INVALID, OR PROHIBITED UNDER + APPLICABLE LAW IN YOUR JURISDICTION, YOU HAVE NO RIGHTS UNDER + THIS LICENSE AND YOU MUST NOT USE, COPY, MODIFY, CREATE + DERIVATIVE WORKS OF, NOR (RE)DISTRIBUTE THIS PRODUCT, NOR ANY + PORTION(S) THEREOF. + . + 8. Except as otherwise provided in this License, if any + provision of this License, or a portion thereof, is found to be + invalid or unenforceable under applicable law, it shall not + affect the validity or enforceability of the remainder of this + License, and such invalid or unenforceable provision shall be + construed to reflect the original intent of the provision and + shall be enforced to the maximum extent permitted by applicable + law so as to effect the original intent of the provision as + closely as possible. + + +License: Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian systems, the complete text of the Apache version 2.0 license + can be found in "/usr/share/common-licenses/Apache-2.0". + + +License: E4M + This product can be copied and distributed free of charge, + including source code. + . + You may modify this product and source code, and distribute such + modifications, and you may derive new works based on this + product, provided that: + . + 1. Any product which is simply derived from this product cannot + be called E4M, or Encryption for the Masses. + . + 2. If you use any of the source code in your product, and your + product is distributed with source code, you must include this + notice with those portions of this source code that you use. + . + Or, + . + If your product is distributed in binary form only, you must + display on any packaging, and marketing materials which + reference your product, a notice which states: + . + "This product uses components written by Paul Le Roux + " + . + 3. If you use any of the source code originally by Eric Young, + you must in addition follow his terms and conditions. + . + 4. Nothing requires that you accept this License, as you have + not signed it. However, nothing else grants you permission to + modify or distribute the product or its derivative works. + . + These actions are prohibited by law if you do not accept this + License. + . + 5. If any of these license terms is found to be to broad in + scope, and declared invalid by any court or legal process, you + agree that all other terms shall not be so affected, and shall + remain valid and enforceable. + . + 6. THIS PROGRAM IS DISTRIBUTED FREE OF CHARGE, THEREFORE THERE + IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY + APPLICABLE LAW. UNLESS OTHERWISE STATED THE PROGRAM IS PROVIDED + "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR + IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE + ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS + WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE + COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + . + 7. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY + MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE + LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, + INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE THE PROGRAM, INCLUDING BUT NOT LIMITED TO LOSS + OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY + YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH + ANY OTHER PROGRAMS, EVEN IF SUCH HOLDER OR OTHER PARTY HAD + PREVIOUSLY BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + +License: BSD-3-clause + The free distribution and use of this software is allowed (with + or without changes) provided that: + . + 1. source code distributions include the above copyright + notice, this list of conditions and the following + disclaimer; + . + 2. binary distributions include the above copyright notice, + this list of conditions and the following disclaimer in + their documentation; + . + 3. the name of the copyright holder is not used to endorse + products built using this software without specific written + permission. + . + DISCLAIMER + . + This software is provided 'as is' with no explicit or implied + warranties in respect of its properties, including, but not + limited to, correctness and/or fitness for purpose. + +License: zlib + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + . + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it and + redistribute it freely, subject to the following restrictions: + . + 1. The origin of this software must not be misrepresented; you + must not claim that you wrote the original software. If you + use this software in a product, an acknowledgment in the + product documentation would be appreciated but is not + required. + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + 3. This notice may not be removed or altered from any source + distribution. diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 00000000..b6106919 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,7 @@ +[DEFAULT] +sign-tags = True +upstream-branch = master +# the default branch for the debian patch: +debian-branch = debian +# the default tag formats used: +upstream-tag = v%(version)s diff --git a/debian/patches/001-user-guide-location.diff b/debian/patches/001-user-guide-location.diff new file mode 100644 index 00000000..fefa79b1 --- /dev/null +++ b/debian/patches/001-user-guide-location.diff @@ -0,0 +1,22 @@ +From: Francis Russell +Date: Mon, 14 Jan 2013 11:44 +Subject: Move manual + +The user manual is installed in /usr/share/doc/ciphershed as opposed to +/usr/share/ciphershed/doc. + +Forwarded: no + +Index: ciphershed-7.1a-source/Main/GraphicUserInterface.cpp +=================================================================== +--- ciphershed-7.1a-source.orig/src/Main/GraphicUserInterface.cpp 2013-01-13 23:15:11.109850819 +0000 ++++ ciphershed-7.1a-source/src/Main/GraphicUserInterface.cpp 2013-01-13 23:15:25.184237643 +0000 +@@ -1088,7 +1088,7 @@ + #elif defined (TC_MACOSX) + docPath += L"/../Resources/CipherShed User Guide.pdf"; + #elif defined (TC_UNIX) +- docPath = L"/usr/share/ciphershed/doc/CipherShed User Guide.pdf"; ++ docPath = L"/usr/share/doc/ciphershed/user_guide.pdf"; + #else + # error TC_RESOURCE_DIR undefined + #endif diff --git a/debian/patches/002-no-preference-x.diff b/debian/patches/002-no-preference-x.diff new file mode 100644 index 00000000..0fbb0bc0 --- /dev/null +++ b/debian/patches/002-no-preference-x.diff @@ -0,0 +1,20 @@ +From: Stefan Sundin +Date: Fri, 12 Sept 2013 +Subject: Disable "x" in the preferences window + +The close icon in the preferences window does not close the preferences, +this patch removes the icon. + +Forwarded: no + +--- ciphershed-7.1a.orig/src/Main/Forms/Forms.cpp 2012-02-07 11:36:48.000000000 +0100 ++++ ciphershed-7.1a/src/Main/Forms/Forms.cpp 2013-06-25 20:26:48.501318815 +0200 +@@ -1582,7 +1582,7 @@ + KeyfileNameTextCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( NewSecurityTokenKeyfileDialogBase::OnKeyfileNameChanged ), NULL, this ); + } + +-PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) ++PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style & (~wxCLOSE_BOX) ) + { + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetExtraStyle( wxWS_EX_VALIDATE_RECURSIVELY ); diff --git a/debian/patches/003-file-manager.diff b/debian/patches/003-file-manager.diff new file mode 100644 index 00000000..e987b964 --- /dev/null +++ b/debian/patches/003-file-manager.diff @@ -0,0 +1,55 @@ +Description: Remove the hardcoded dependency on nautilus in most DEs, use xdg-utils +Author: Unit 193 + +Forwarded: no +Last-Update: 2013-02-14 + +--- ciphershed-7.1a.orig/src/Main/UserInterface.cpp ++++ ciphershed-7.1a/src/Main/UserInterface.cpp +@@ -829,41 +829,13 @@ namespace CipherShed + + #else + // MIME handler for directory seems to be unavailable through wxWidgets +- wxString desktop = GetTraits()->GetDesktopEnvironment(); +- +- if (desktop == L"GNOME" || desktop.empty()) +- { +- args.push_back ("--no-default-window"); +- args.push_back ("--no-desktop"); +- args.push_back (string (path)); +- try +- { +- Process::Execute ("nautilus", args, 2000); +- } +- catch (TimeOut&) { } +- catch (exception &e) { ShowError (e); } +- } +- else if (desktop == L"KDE") ++ args.push_back (string (path)); ++ try + { +- try +- { +- args.push_back (string (path)); +- Process::Execute ("dolphin", args, 2000); +- } +- catch (TimeOut&) { } +- catch (exception&) +- { +- args.clear(); +- args.push_back ("openURL"); +- args.push_back (string (path)); +- try +- { +- Process::Execute ("kfmclient", args, 2000); +- } +- catch (TimeOut&) { } +- catch (exception &e) { ShowError (e); } +- } ++ Process::Execute ("xdg-open", args, 2000); + } ++ catch (TimeOut&) { } ++ catch (exception &e) { ShowError (e); } + #endif + } + diff --git a/debian/patches/004-indicator-support.diff b/debian/patches/004-indicator-support.diff new file mode 100644 index 00000000..50008cba --- /dev/null +++ b/debian/patches/004-indicator-support.diff @@ -0,0 +1,190 @@ +From: Stefan Sundin , Unit 193 +Date: Fri, 06 July 2017 +Subject: Add support for Ubuntu and Ayatana application indicators. + +This patch adds compile-time support for application indicators. + +Forwarded: no + +Signed-off-by: Unit 193 + +Index: ciphershed/src/Main/Forms/MainFrame.cpp +=================================================================== +--- ciphershed.orig/src/Main/Forms/MainFrame.cpp ++++ ciphershed/src/Main/Forms/MainFrame.cpp +@@ -38,6 +38,9 @@ using namespace std; + namespace CipherShed + { + MainFrame::MainFrame (wxWindow* parent) : MainFrameBase (parent), ++#ifdef HAVE_INDICATORS ++ indicator (NULL), ++#endif + ListItemRightClickEventPending (false), + SelectedItemIndex (-1), + SelectedSlotNumber (0), +@@ -1412,6 +1413,31 @@ namespace CipherShed + } + } + ++#ifdef HAVE_INDICATORS ++ void MainFrame::SetBusy (bool busy) ++ { ++ gtk_widget_set_sensitive(indicator_item_mountfavorites, !busy); ++ gtk_widget_set_sensitive(indicator_item_dismountall, !busy); ++ gtk_widget_set_sensitive(indicator_item_prefs, !busy); ++ gtk_widget_set_sensitive(indicator_item_exit, !busy /*&& CanExit()*/); ++ } ++ ++ static void IndicatorOnShowHideMenuItemSelected (GtkWidget *widget, MainFrame *self) { Gui->SetBackgroundMode (!Gui->IsInBackgroundMode()); } ++ static void IndicatorOnMountAllFavoritesMenuItemSelected (GtkWidget *widget, MainFrame *self) { self->SetBusy(true); self->MountAllFavorites (); self->SetBusy(false); } ++ static void IndicatorOnDismountAllMenuItemSelected (GtkWidget *widget, MainFrame *self) { self->SetBusy(true); Gui->DismountAllVolumes(); self->SetBusy(false); } ++ static void IndicatorOnPreferencesMenuItemSelected (GtkWidget *widget, MainFrame *self) { ++ self->SetBusy(true); ++ PreferencesDialog dialog (self); ++ dialog.ShowModal(); ++ self->SetBusy(false); ++ } ++ static void IndicatorOnExitMenuItemSelected (GtkWidget *widget, MainFrame *self) { ++ self->SetBusy(true); ++ if (Core->GetMountedVolumes().empty() || Gui->AskYesNo (LangString ["CONFIRM_EXIT"], false, true)) ++ self->Close (true); ++ self->SetBusy(false); ++ } ++#endif + void MainFrame::ShowTaskBarIcon (bool show) + { + if (!show && mTaskBarIcon->IsIconInstalled()) +@@ -1421,8 +1446,47 @@ namespace CipherShed + else if (show && !mTaskBarIcon->IsIconInstalled()) + { + #ifndef TC_MACOSX ++#ifndef HAVE_INDICATORS + mTaskBarIcon->SetIcon (Resources::GetCipherShedIcon(), L"CipherShed"); + #endif ++#endif ++#ifdef HAVE_INDICATORS ++ if (indicator == NULL) { ++ indicator = app_indicator_new ("ciphershed", "ciphershed", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); ++ app_indicator_set_status (indicator, APP_INDICATOR_STATUS_ACTIVE); ++ ++ GtkWidget *menu = gtk_menu_new(); ++ ++ indicator_item_showhide = gtk_menu_item_new_with_label (LangString[Gui->IsInBackgroundMode() ? "SHOW_TC" : "HIDE_TC"].mb_str()); ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_showhide); ++ g_signal_connect (indicator_item_showhide, "activate", G_CALLBACK (IndicatorOnShowHideMenuItemSelected), this); ++ ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new()); ++ ++ indicator_item_mountfavorites = gtk_menu_item_new_with_label ("Mount All Favorite Volumes"); ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_mountfavorites); ++ g_signal_connect (indicator_item_mountfavorites, "activate", G_CALLBACK (IndicatorOnMountAllFavoritesMenuItemSelected), this); ++ ++ indicator_item_dismountall = gtk_menu_item_new_with_label ("Dismount All Mounted Volumes"); ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_dismountall); ++ g_signal_connect (indicator_item_dismountall, "activate", G_CALLBACK (IndicatorOnDismountAllMenuItemSelected), this); ++ ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new()); ++ ++ indicator_item_prefs = gtk_menu_item_new_with_label ("Preferences..."); ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_prefs); ++ g_signal_connect (indicator_item_prefs, "activate", G_CALLBACK (IndicatorOnPreferencesMenuItemSelected), this); ++ ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new()); ++ ++ indicator_item_exit = gtk_menu_item_new_with_label ("Exit"); ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_exit); ++ g_signal_connect (indicator_item_exit, "activate", G_CALLBACK (IndicatorOnExitMenuItemSelected), this); ++ ++ gtk_widget_show_all (menu); ++ app_indicator_set_menu (indicator, GTK_MENU (menu)); ++ } ++#endif + } + } + +Index: ciphershed/src/Main/Forms/MainFrame.h +=================================================================== +--- ciphershed.orig/src/Main/Forms/MainFrame.h ++++ ciphershed/src/Main/Forms/MainFrame.h +@@ -9,6 +9,16 @@ + #ifndef TC_HEADER_Main_Forms_MainFrame + #define TC_HEADER_Main_Forms_MainFrame + ++#ifdef HAVE_INDICATORS ++#define GSocket GlibGSocket ++#ifdef UBUNTU_INDICATOR ++#include ++#elif AYATANA_INDICATOR ++#include ++#endif ++#undef GSocket ++#endif ++ + #include "Forms.h" + #include "ChangePasswordDialog.h" + +@@ -29,6 +33,16 @@ namespace CipherShed + static FilePath GetShowRequestFifoPath () { return Application::GetConfigFilePath (L".show-request-queue", true); } + #endif + ++ void MountAllFavorites (); ++#ifdef HAVE_INDICATORS ++ AppIndicator *indicator; ++ GtkWidget *indicator_item_showhide; ++ GtkWidget *indicator_item_mountfavorites; ++ GtkWidget *indicator_item_dismountall; ++ GtkWidget *indicator_item_prefs; ++ GtkWidget *indicator_item_exit; ++ void SetBusy (bool busy); ++#endif + protected: + enum + { +@@ -62,7 +76,6 @@ namespace CipherShed + void LoadFavoriteVolumes (); + void LoadPreferences (); + void MountAllDevices (); +- void MountAllFavorites (); + void MountVolume (); + void OnAboutMenuItemSelected (wxCommandEvent& event); + void OnActivate (wxActivateEvent& event); +Index: ciphershed/src/Main/GraphicUserInterface.cpp +=================================================================== +--- ciphershed.orig/src/Main/GraphicUserInterface.cpp ++++ ciphershed/src/Main/GraphicUserInterface.cpp +@@ -1475,6 +1475,9 @@ namespace CipherShed + } + + BackgroundMode = state; ++#ifdef HAVE_INDICATORS ++ gtk_menu_item_set_label ((GtkMenuItem*) ((MainFrame*) mMainFrame)->indicator_item_showhide, LangString[Gui->IsInBackgroundMode() ? "SHOW_TC" : "HIDE_TC"].mb_str()); ++#endif + } + + void GraphicUserInterface::SetListCtrlColumnWidths (wxListCtrl *listCtrl, list columnWidthPermilles, bool hasVerticalScrollbar) const +Index: ciphershed/src/Makefile +=================================================================== +--- ciphershed.orig/src/Makefile ++++ ciphershed/src/Makefile +@@ -57,6 +57,21 @@ export WXCONFIG_CFLAGS := + export WXCONFIG_CXXFLAGS := + WX_ROOT ?= .. + ++ifneq (,$(findstring gtk3,$(shell $(WX_CONFIG) --selected-config))) ++ INDICATOR_LIBRARY=appindicator3-0.1 ++else ++ INDICATOR_LIBRARY=appindicator-0.1 ++endif ++ ++ifeq ($(shell pkg-config --exists $(INDICATOR_LIBRARY) && echo $$?),0) ++ export C_CXX_FLAGS += -DHAVE_INDICATORS -DUBUNTU_INDICATOR ++ export LIBS += $(shell pkg-config --libs $(INDICATOR_LIBRARY)) ++ C_CXX_FLAGS += $(shell pkg-config --cflags $(INDICATOR_LIBRARY)) ++else ifeq ($(shell pkg-config --exists ayatana-$(INDICATOR_LIBRARY) && echo $$?),0) ++ export C_CXX_FLAGS += -DHAVE_INDICATORS -DAYATANA_INDICATOR ++ export LIBS += $(shell pkg-config --libs ayatana-$(INDICATOR_LIBRARY)) ++ C_CXX_FLAGS += $(shell pkg-config --cflags ayatana-$(INDICATOR_LIBRARY)) ++endif + + export TC_BUILD_CONFIG := Release + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..2a6c51fa --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,4 @@ +001-user-guide-location.diff +002-no-preference-x.diff +003-file-manager.diff +004-indicator-support.diff diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 00000000..981d70da --- /dev/null +++ b/debian/prerm @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +case "$1" in + remove|upgrade|deconfigure|failed-upgrade) + (mount | grep -q ciphershed_aux_mnt) && + echo "Error: all CipherShed volumes must be unmounted before upgrade." && exit 1 + exit 0 + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..dad75dee --- /dev/null +++ b/debian/rules @@ -0,0 +1,33 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/default.mk +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +export TC_EXTRA_CFLAGS = $(CPPFLAGS) $(CFLAGS) +export TC_EXTRA_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) +export TC_EXTRA_LFLAGS = $(LDFLAGS) + +%: + dh $@ --sourcedirectory=src + +override_dh_auto_build: + dh_auto_build -- VERBOSE=1 NOSTRIP=1 + convert -resize 32x32 src/Resources/Icons/CipherShed-48x48.xpm ciphershed.xpm + +override_dh_clean: + dh_clean user_guide.pdf ciphershed.xpm + +override_dh_install: + cp doc/userdocs/guide/CipherShed-User-Guide*.pdf user_guide.pdf + dh_install + +override_dh_installinit: + dh_installinit --no-start -- stop 10 0 1 6 . + +override_dh_compress: + dh_compress -Xuser_guide.pdf diff --git a/debian/scripts/30ciphershed b/debian/scripts/30ciphershed new file mode 100755 index 00000000..4c24dbe3 --- /dev/null +++ b/debian/scripts/30ciphershed @@ -0,0 +1,19 @@ +#!/bin/sh + +test -d /run/systemd/system && exit 0 + +CIPHERSHED_SUSPEND_UNMOUNT=yes + +. /etc/default/ciphershed + +case "${CIPHERSHED_SUSPEND_UNMOUNT}" in +[Nn]*) + exit 0 + ;; +esac + +case "$1" in + suspend|hibernate) + /usr/bin/ciphershed --dismount + ;; +esac diff --git a/debian/scripts/ciphershed b/debian/scripts/ciphershed new file mode 100755 index 00000000..1befac48 --- /dev/null +++ b/debian/scripts/ciphershed @@ -0,0 +1,17 @@ +#!/bin/sh + +CIPHERSHED_SUSPEND_UNMOUNT=yes + +. /etc/default/ciphershed + +case "${CIPHERSHED_SUSPEND_UNMOUNT}" in +[Nn]*) + exit 0 + ;; +esac + +case "$1" in + pre) + /usr/bin/ciphershed --dismount + ;; +esac diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..e0d5a027 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +https://github.com/CipherShed/CipherShed/releases .*/v([\d\.\w]+)\.tar\.gz