gparted-0.30.0/0000775000175000017500000000000013167172123010226 500000000000000gparted-0.30.0/config.h.in0000664000175000017500000000676413167172027012211 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 when help documentation is built */ #undef ENABLE_HELP_DOC /* Define to 1 to enable deletion of old partitions before creating a loop table workaround */ #undef ENABLE_LOOP_DELETE_OLD_PTNS_WORKAROUND /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Define to 1 if online resize is enabled */ #undef ENABLE_ONLINE_RESIZE /* Define to 1 to enable partition re-read workaround */ #undef ENABLE_PT_REREAD_WORKAROUND /* description */ #undef GETTEXT_PACKAGE /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* define if the compiler supports basic C++11 syntax */ #undef HAVE_CXX11 /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if gtkmm provides Gtk::MessageDialog::get_message_area() method. */ #undef HAVE_GET_MESSAGE_AREA /* Define to 1 if glibmm provides Glib::Regex class. */ #undef HAVE_GLIB_REGEX /* Define to 1 if gtkmm provides gtk_show_uri() function. */ #undef HAVE_GTK_SHOW_URI /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL /* Define to 1 if you have the `parted' library (-lparted). */ #undef HAVE_LIBPARTED /* Define to 1 if have libparted fs resize capability */ #undef HAVE_LIBPARTED_FS_RESIZE /* Define to 1 if you have the `uuid' library (-luuid). */ #undef HAVE_LIBUUID /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if gtkmm-2.4 provides Gtk::Window::set_default_icon_name() method. */ #undef HAVE_SET_DEFAULT_ICON_NAME /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 to use native libparted /dev/mapper dmraid support */ #undef USE_LIBPARTED_DMRAID /* Define to 1 to use libparted large sector support */ #undef USE_LIBPARTED_LARGE_SECTOR_SUPPORT /* Version number of package */ #undef VERSION gparted-0.30.0/README0000664000175000017500000003112213164740103011021 00000000000000GPARTED ======= Gparted is the GNOME Partition Editor for creating, reorganizing, and deleting disk partitions. A hard disk is usually subdivided into one or more partitions. These partitions are normally not re-sizable (making one smaller and the adjacent one larger.) Gparted makes it possible for you to take a hard disk and change the partition organization, while preserving the partition contents. More specifically, Gparted enables you to create, destroy, resize, move, check, label, and copy partitions, and the file systems contained within. This is useful for creating space for new operating systems, reorganizing disk usage, and mirroring one partition with another (disk imaging). Gparted can also be used with storage devices other than hard disks, such as USB flash drives, and memory cards. Visit http://gparted.org for more information. LICENSING --------- GParted is released under the General Public License version 2, or (at your option) any later version. (GPLv2+). All files are released under the GPLv2+ unless explicitly licensed otherwise. The GParted Manual is released under the GNU Free Documentation License version 1.2 or any later version. (GFDLv1.2+). Google Test C++ test framework is released under the 3-Clause BSD License. (BSD-3-Clause). See these files for more details: COPYING - GNU General Public License version 2 COPYING-DOCS - GNU Free Documentation License version 1.2 lib/gtest/LICENSE - 3-Clause BSD License NEWS ---- Information about changes to this release, and past releases can be found in the file: NEWS INSTALL ------- a. Pre-built Binary Many GNU/Linux distributions already provide a pre-built binary package for GParted. Instructions on how to install GParted on some distributions is given below: Debian or Ubuntu ---------------- sudo apt-get install gparted Fedora or CentOS/RHEL --------------------- su - yum install gparted OpenSUSE -------- sudo zypper install gparted b. Building from Source Briefly, build and install GParted into the default location of /usr/local using: ./configure make sudo make install sudo install -m 644 org.gnome.gparted.policy \ /usr/share/polkit-1/actions/org.gnome.gparted.local.policy This assumes all the dependencies are already installed, builds the default configuration and polkit is being used as the graphical su program. The following dependencies are required to build GParted from source: g++ e2fsprogs parted gnome-common gtkmm24 gettext gnome-doc-utils - required if help documentation is to be built On Debian or Ubuntu, these dependencies may be obtained by running one of the following commands: Either; sudo apt-get build-dep gparted Or; sudo apt-get install build-essential e2fsprogs uuid uuid-dev \ gnome-common libparted-dev libgtkmm-2.4-dev \ libdevmapper-dev gnome-doc-utils docbook-xml On Fedora, you will need to run (as root); yum install gtkmm24-devel parted-devel e2fsprogs-devel gettext \ 'perl(XML::Parser)' desktop-file-utils libuuid-devel \ gnome-doc-utils docbook-dtds rarian-compat intltool \ gnome-common gcc-c++ yum groupinstall 'Development Tools' On openSUSE, these dependencies may be obtained by running the following commands; sudo zypper install automake autoconf make gnome-common \ libuuid-devel parted-devel gtkmm2-devel \ gnome-doc-utils-devel docbook-xsl-stylesheets sudo zypper install -t pattern devel_c_c++ Again, build GParted with the default configuration and install into the default location of /usr/local using: ./configure make sudo make install If you wish to build this package without the help documentation use the --disable-doc flag: E.g., ./configure --disable-doc If you wish to build this package for use on a desktop that does not support scrollkeeper use the --disable-scrollkeeper flag: E.g., ./configure --disable-scrollkeeper If you wish to build this package to use native libparted /dev/mapper dmraid support use the --enable-libparted-dmraid flag: E.g., ./configure --enable-libparted-dmraid If you wish to build this package with online resize support then the following is required: a) Linux kernel version 3.6 or higher. b) Libparted with online resize support. Either: i) Libparted version 3.2 or later which includes online resize support as standard. In this case GParted is automatically built with online resize support. ii) Online resize support back ported into an earlier version of libparted. This is only known to be included in Debian and derived distributions with parted version 2.3-14 and higher. In this case online resize support must be specifically enabled with the --enable-online-resize flag: E.g., ./configure --enable-online-resize If you wish to build GParted to allow it to use xhost to grant root access to the X11 server use the --enable-xhost-root flag. This is required to allow GParted to display under Wayland. ./configure --enable-xhost-root Please note that more than one configure flag can be used: E.g., ./configure --disable-doc --enable-libparted-dmraid The INSTALL file contains further GNU installation instructions. c. Installing polkit's Action File GParted needs to run as root therefore it needs a graphical switch user program to allow normal users to run it. Most desktops now use polkit as their preferred authorisation mechanism. Therefore ./configure looks for polkit's pkexec as the first choice with fallbacks in order being: gksudo, gksu, kdesudo and finally xdg-su. Also polkit reads action files only from directory /usr/share/polkit-1/actions. Therefore it is likely that a polkit action file will need to be installed into this directory. To determine if polkit's pkexec program is being used as the graphical privilege escalation program examine the output from ./configure. These lines report that pkexec is being used: checking for pkexec >= 0.102... 0.112 found Where as either of these lines of ./configure output report that pkexec is not being used because either it was too old a version or it was not found: checking for pkexec >= 0.102... 0.96 found checking for pkexec >= 0.102... not found When GParted is configured with prefix /usr (using command ./configure --prefix=/usr) then make install will automatically install the polkit action file into the correct directory and no further steps need to be taken. This is typically the case for distribution builds of GParted. However when GParted is configured with the default prefix of /usr/local, or any prefix other than /usr, then the polkit action file has to be manually installed into the correct directory. Also it should have a unique file name to avoid overwriting the action file from the distribution's package. Install the polkit action file with a unique name including an extra ".local" in the name: sudo install -m 644 org.gnome.gparted.policy \ /usr/share/polkit-1/actions/org.gnome.gparted.local.policy d. Building using a Specific (lib)parted Version 1) Download the parted version you wish to use (e.g., 3.2) from: http://ftp.gnu.org/gnu/parted/ 2) Build and install parted. Extract parted tarball, configure, make, and sudo make install. Note that by default this will install into /usr/local. 3) Set environment variables to inform the GParted build system to use libparted from /usr/local: export CPPFLAGS=-I/usr/local/include export LDFLAGS=-L/usr/local/lib export LD_RUN_PATH=/usr/local/lib export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig 4) Build gparted using steps listed above in "Building from Source". Note that when you run ./configure you should see the specific version of parted listed in the check for libparted >= 1.7.1. You will also see the libparted version listed when running gparted from the command line. DIRECTORIES ------------ compose - contains String::ucompose() function data - contains desktop icons doc - contains manual page documentation help - contains GParted Manual and international translations include - contains source header files lib/gtest - contains Google Test C++ test framework libraries m4 - contains macro files po - contains international language translations src - contains C++ source code DISTRIBUTION NOTES ------------------ GParted uses GNU libparted to detect and manipulate devices and partition tables. The blkid command is also required to detect those file systems which libparted doesn't detect. (The blkid command should be considered a mandatory requirement). GParted also queries and manipulates the file systems within those devices and partitions. When available, it uses each file system's specific commands. The following optional file system specific packages provide this support: btrfs-progs / btrfs-tools e2fsprogs f2fs-tools dosfstools mtools - required to read and write FAT16/32 volume labels and UUIDs hfsutils hfsprogs jfsutils nilfs-utils ntfs-3g / ntfsprogs reiser4progs reiserfsprogs / reiserfs-utils / reiserfs udftools xfsprogs, xfsdump For dmraid support, the following packages are required: dmsetup - removes /dev/mapper entries dmraid - lists dmraid devices and creates /dev/mapper entries For GNU/Linux distribution dmraid support, the following are required: - kernel built with Device Mapping and Mirroring built. From menuconfig, it is under Device Drivers -> (RAID & LVM). - dmraid drive arrays activated on boot (e.g., dmraid -ay). For LVM2 Physical Volume support the following command is required: lvm - LVM2 administration tool And device-mapper support in the kernel. For accurate detection and reporting of Linux Software RAID Arrays the following command is required: mdadm - SWRaid administration tool For LUKS support the following commands are required: cryptsetup - LUKS volume administration tool dmsetup - Device-mapper administration tool For attempt data rescue for lost partitions, the following package is required: gpart - guesses PC-type hard disk partitions Several more commands are optionally used by GParted if found on the system. These commands include: blkid - [mandatory requirement] used to detect file systems libparted doesn't, read UUIDs and volume labels hdparm - used to query disk device serial numbers udisks - used to prevent automounting of file systems devkit-disks - used to prevent automounting of file systems {filemanager} - used in attempt data rescue to display discovered file systems. (e.g., nautilus, pcmanfm) hal-lock - used to prevent automounting of file systems pkexec - used to acquire root privileges in gparted shell script wrapper, but only if available when gparted source is configured gksudo - alternatively used to acquire root privileges in gparted shell script wrapper, second choice if available when gparted source is configured gksu - alternatively used to acquire root privileges in gparted shell script wrapper, third choice if available when gparted source is configured kdesudo - alternatively used to acquire root privileges in gparted shell script wrapper, fourth choice if available when gparted source is configured xdg-su - alternatively used to acquire root privileges in gparted shell script wrapper, last choice if available when gparted source is configured udevinfo - used in dmraid to query udev name udevadm - used in dmraid to query udev name yelp - used to display help manual xhost - used to grant root access to the X11 server, only when configured to do so gparted-0.30.0/depcomp0000755000175000017500000005601613167172027011534 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gparted-0.30.0/ChangeLog0000664000175000017500000367560513167172123011746 00000000000000# Generated by Makefile. Do not edit. 2017-10-10 Curtis Gedak ========== gparted-0.30.0 ========== 2017-10-08 Claude Paroz Updated French translation 2017-10-08 Rūdolfs Mazurs Update Latvian translation 2017-10-07 Daniel Șerbănescu Update Romanian translation 2017-10-07 Daniel Șerbănescu Update Romanian translation 2017-10-04 Mario Blättermann Update German translation 2017-10-04 Daniel Mustieles Update Spanish translation 2017-10-04 Daniel Mustieles Update Spanish translation 2017-10-04 Trần Ngọc Quân Updated Vietnamese translation Signed-off-by: Trần Ngọc Quân 2017-10-03 Rafael Fontenelle Update Brazilian Portuguese translation 2017-10-03 Rafael Fontenelle Update Brazilian Portuguese translation 2017-09-26 Mike Fleetwood Extract common code into new method get_lp_partition() 2016-08-20 Mike Fleetwood Calibrate whole disk device partitions again (#788308) Fix up following switch from whole_device flag to TYPE_UNPARTITIONED. Also calibrate the type for whole disk device partitions. Bug 788308 - Remove whole_device partition flag 2016-08-20 Mike Fleetwood Restore Information dialog display of whole disk devices (#788308) So they display as previously; as all grey in the graphic and with only the correct attributes shown. Fix up following switch from whole_device flag to TYPE_UNPARTITIONED. Bug 788308 - Remove whole_device partition flag 2016-08-20 Mike Fleetwood Disallow formatting of unrecognised whole disk devices again (#788308) Fix up following switch from whole_device flag to TYPE_UNPARTITIONED. Bug 788308 - Remove whole_device partition flag 2016-08-20 Mike Fleetwood Allow Partition > New on unallocated whole disk devices again (#788308) Fix up following switch from whole_device flag to TYPE_UNPARTITIONED. Again use FS_UNALLOCATED to determine if a partition represents unallocated space and creation of a new partition should be allowed. This is so that trying to create a new partition on a whole disk device shows the "No partition table found on device /dev/DEV" warning again. Bug 788308 - Remove whole_device partition flag 2016-08-20 Mike Fleetwood Select unallocated whole disk devices again (#788308) After the change from whole_device flag to TYPE_UNPARTITIONED, unallocated whole disk devices are no longer automatically selected because the partition type is no longer TYPE_UNALLOCATED. Fix by checking for file system type FS_UNALLOCATED when identifying the largest unallocated space. Bug 788308 - Remove whole_device partition flag 2016-08-20 Mike Fleetwood Display unrecognised whole disk devices as all grey again (#788308) Following the switch from whole_device flag to TYPE_UNPARTITIONED, unallocated space can be found in two partition types: TYPE_UNALLOCATED TYPE_UNPARTITIONED (only when filesystem == FS_UNALLOCATED) As the file system in both cases is FS_UNALLOCATED check for that when determining whether a partition is unallocated or not. Bug 788308 - Remove whole_device partition flag 2016-08-19 Mike Fleetwood Switch from whole_device flag to TYPE_UNPARTITIONED (#788308) Remove whole_device flag and replace with new partition type TYPE_UNPARTITIONED. Minimally adapt the remaining code to compile and run. Bug 788308 - Remove whole_device partition flag 2016-08-13 Mike Fleetwood Add TYPE_UNPARTITIONED partition type (#788308) Just adds the enumeration. Using it will follow. Bug 788308 - Remove whole_device partition flag 2016-08-19 Mike Fleetwood Update partition related checks in set_valid_operations() (#788308) Update the partition can be named and partition flags can be managed checks from being disallowed on unallocated partition types, to being allowed on primary, logical and extended partition types. This is in preparation for the introduction of new unallocated partition type. Bug 788308 - Remove whole_device partition flag 2016-08-19 Mike Fleetwood Add FILESYSTEM_MAP[FS_EXTENDED] entry Now when refreshing the devices, GParted_Core::read_label() calls GParted_Core::get_fs() with parameter FS_EXTENDED. Before this change, get_fs() would fail to find file system capabilities set for FS_EXTENDED and construct a not supported capabilities set and return that. Afterwards, find_supported_filesystems() creates a not supported capabilities set from the NULL pointer for FS_EXTENDED and adds this entry into the FILESYSTEMS vector. Then get_fs() finds that not supported capabilities set for FS_EXTENDED in the FILESYSTEMS vector and returns that. This makes no functional difference. It just seems right as other unsupported but used file system types have entries in FILESYSTEM_MAP. See this earlier commit doing the same thing: 7870a92b8097b3b8067cc87b891451d5164e9b74 Add FILESYSTEM_MAP[FS_UNALLOCATED] entry 2016-08-19 Mike Fleetwood Remove some unnecessary extended partition checks from GParted_Core (#788308) For example GParted_Core::read_label() is already called for empty partitions where .filesystem = FS_UNKNOWN. In that case get_fs() returns an unsupported capability set with all capabilities set to FS::NONE. The same would be true extended partitions where .filesystem = FS_EXTENDED too; get_fs() would return an unsupported capability set with all capabilities set to FS::NONE. Therefore the if not extended partition condition around the switch statements is not necessary in GParted_Core::read_label(), read_uuid(), label_filesystem() and change_uuid(). Remove. This also achieves removal of some uses of partition type enumerations in advance of the introduction of new partition type TYPE_UNPARTITIONED. Bug 788308 - Remove whole_device partition flag 2016-08-13 Mike Fleetwood Add and use Partition::set_unpartitioned() method (#788308) PATCHSET OVERVIEW: When unpartitioned drive read-write support was added this commit added a whole_device flag: 5098744f9aa958ba18d2a4657ea4345e275c885b Add whole_device flag to the partition object (#743181) Using a whole_device flags now seems not the correct way to model unpartitioned drives. GParted models an uninitialised drive as: .path = _("uninitialized") .type = TYPE_UNALLOCATED .whole_device = true .filesystem = FS_UNALLOCATED and a whole drive file system, using ext4 for example, as: .path = "/dev/sdb" .type = TYPE_PRIMARY .whole_device = true .filesystem = FS_EXT4 No partitioning changed yet the type of the partition in the model changed between TYPE_UNALLOCATED and TYPE_PRIMARY depending on whether the whole drive contains a recognised file system or not. The partition object describing a file system within a LUKS encryption mapping is another case of the model not matching reality. .path = /dev/mapper/crypt_sdb1_crypt .type = TYPE_PRIMARY .whole_device = true .filesystem = FS_EXT4 There is no partition table within the encryption mapping, the file system fills it, but GParted records it as a primary partition. Make TYPE_UNALLOCATED and TYPE_PRIMARY be reserved for representing unallocated space and primary partitions within a partitioned disk drive and introduce new TYPE_UNPARTITIONED for all cases of an unpartitioned whole disk drive. The GParted UI does differentiate between an unallocated whole disk device and anything else by requiring a partition table to be created first, even if that is just the loop partition table. That determination can simply look for the partition object containing file system type FS_UNALLOCATED instead. THIS PATCH: Create set_unpartitioned() helper method to set a partition object to represent a whole disk drive and use everywhere such an object is modelled. This matches what existing methods Set_Unallocated() and indeed Set() do for unallocated space and any type of partition respectively. For now the partition type is still set to either TYPE_UNALLOCATED or TYPE_PRIMARY so the rest of the code base remains the same. TYPE_UNPARTITIONED will be introduced later. Bug 788308 - Remove whole_device partition flag 2017-10-02 Mario Blättermann Update German translation 2017-09-30 Dušan Kazik Update Slovak translation 2017-09-28 Anders Jonsson Update Swedish translation 2017-09-25 Marek Cernocky Updated Czech translation 2017-09-25 Curtis Gedak Convert Manual links to HTTPS where possible and update version 2017-09-16 Mike Fleetwood Describe Create New Partition / Partition name field in the Manual Missed when adding partition naming at creation time in enhancement: Bug 746214 - Partition naming enhancements starting with this commit: f804bc3244c1ee4509fe02b66990709566b69d08 Allow partition naming on busy partitions (#746214) 2017-09-19 Mike Fleetwood Pass string literals directly to execute_command() There were a few cases of creating a local string variable from a literal and then passing the variable to execute_command() like this: Glib::ustring cmd = "whatever"; Utils::execute_command( cmd, ... ); This creates an unnecessary local variable. Instead pass the string literal directly to Utils::execute_command() like this: Utils::execute_command( "whatever", ... ); This also make the code a little bit more grep friendly. 2017-09-21 Mike Fleetwood Stop nicing external commands run by the DMRaid module (#788007) No other commands run by GParted are niced, so stop nicing commands run from the DMRaid module. I think nicing of possibly long running file system modification commands would have made virtually no difference because "nice -n 19" lowered the CPU priority, but such command would be I/O bound. History: Nicing of file system modification commands was added by this commit from 2006-08-21: 82e6f6b132fd7960950a71a2af2db6ef93fde583 added nice -n 19, so that all extensive filesystem operations will be Nicing of DMRaid operations was copied into the DMRaid module when it was added here in 2009-03-14: 5865c92dc054dc87739e6a70b21f91825f214c9e Added new class for dmraid support Nicing was removed from file system modification commands with this commit from 2013-02-22: 52a2a9b00a32996921ace055e71d0e09fb33c5fe Reduce threading (#685740) Bug 788007 - Remove minor bits of legacy from DMRaid module 2017-09-21 Mike Fleetwood Remove backward compatibility for dmraid without -P option (#788007) The -P option was first added to dmraid-1.0.0.rc15 released 2006-09-17 [1]. dmraid-1.0.0.rc16 (a later release) was included in Debian 6 and Ubunbu 12.04 LTS. dmraid-1.0.0.rc13 was included in RedHat/CentOS 5 however the -P option was back ported into RedHat/CentOS 5.1. All of these distributions are so old as to be no longer supported and yet they provided the dmraid -P option. Therefore backward compatibility for dmraid without the -P option is no longer required. So remove it. [1] old dmraid source code releases http://people.redhat.com/heinzm/sw/dmraid/src/old/ Bug 788007 - Remove minor bits of legacy from DMRaid module 2017-09-25 Andre Klapper Fix typo in Romanian user docs translation 2017-09-25 Andre Klapper Fix typo in pt_BR user docs translation 2017-09-03 Pali Rohár Correctly quote and escape arguments passed to external commands (#787203) Trying to set a file system label to (including the double quotes): " --help " fails. For example labelling an ext4 file system would try to run this command: # e2label /dev/sdb1 "" --help "" Usage: e2label device [newlabel] # echo $? 1 Alternatively trying to create a file system with a label of just a double quote also fails. The Applying Pending Operations dialog waits forever and won't cancel or force cancel. Have to use the window manager close window button to close the dialog. Also GParted reports this error to the console: (gpartedbin:9648): glibmm-CRITICAL **: unhandled exception (type Glib::Error) in signal handler: domain: g-shell-error-quark code : 0 what : Text ended before matching quote was found for ". (The text was 'mkfs.xfs -f -L """ /dev/sdb2') Command strings are parsed and split into argv array by function Glib::shell_parse_argv() which calls internal glib function tokenize_command_line() for shell tokenization. It expects the command string to be properly quoted and escaped and after tokenization, calls g_shell_unquote() on every parsed argument. So to prevent constructing incorrect commands, every non-static string needs to be properly quoted. GParted only puts labels and mount points into double quotes, but has not escaped special characters in those values itself. This patch fixes all these problems by using Glib::shell_quote() on all variable values. Labels, mount points, paths and all others too. Probably a better solution would be to use a new function which takes argv array instead of one string with all the, correctly quoted and escaped, arguments concatenated together. Bug 787203 - Correctly quote and escape arguments of external programs passed to execute_command() 2017-09-03 Pali Rohár Correctly quote and escape command line argument passed to "sh -c" (#787203) Shell fragments must be properly quoted and escaped to prevent execution of unintended commands derived from user controllable data. For example: $ printf '#!/bin/sh\necho test > out\n' > script.sh $ chmod +x script.sh $ truncate -s 20M 'jfs;script.sh' $ mkfs.jfs -q 'jfs;script.sh' $ ls -l out ls: cannot access out: No such file or directory $ sudo PATH=$PWD:$PATH /usr/local/bin/gparted 'jfs;script.sh' $ sudo PATH=$PWD:$PATH /usr/local/bin/gparted 'jfs;script.sh' $ ls -l out -rw-r--r-- 1 root root 5 Sep 12 23:11 out $ cat out test What is happening is that jfs::set_used_sectors() is using the device name 'jfs;script.sh' without quoting it and passing it to the shell to execute like this: sh -c 'echo dm | jfs_debugfs jfs;script.sh' which the shell duly executes as these two commands: echo dm | jfs_debugfs jfs script.sh This could be a security related issue as "sh -c" is able to execute arbitrary shell commands from the argument if if contains shell special characters. Use Glib::shell_quote() [1] to quote and escape file names and whole commands passed to the shell. [1] Glib::shell_quote(const std::string & unquoted_string) https://developer.gnome.org/glibmm/stable/group__ShellUtils.html "Quotes a string so that the shell (/bin/sh) will interpret the quoted string to mean unquoted_string. If you pass a filename to the shell, for example, you should first quote it with this function." Bug 787203 - Correctly quote and escape arguments of external programs passed to execute_command() 2017-09-02 Pali Rohár Make sure that FS_Info cache is loaded for all named paths (#787181) Naming a file system image file on the command line is shown by GParted as unknown. $ truncate -s 100M /tmp/fat.img $ mkfs.vfat /tmp/fat.img $ sudo ./gpartedbin /tmp/fat.img Currently the FS_Info cache is loaded for all devices reported by blkid (plus all whole disk devices identified from /proc/partitions even if blkid reports nothing). However file system images named on the command line are not queried so GParted can't identify them. Fix by ensuring that the FS_Info blkid cache is loaded for all named devices, including named file system image files. Note that Mount_Info::load_cache() depends on the contents of the FS_Info cache to lookup UUID= and LABEL= device names from /etc/fstab. However only file systems in block devices can be mounted like this, and never file system image files, so the fact that the cache may be extended afterwards by FS_Info::load_cache_for_paths() does not matter. History Prior to version 0.22.0, when unpartitioned drive support was added, GParted could recognise some file system image files using loop partition handling in libparted. However libparted before version 3.2 reported the loop partition name as the whole disk device name appended with "1" so all the query commands were provided a non-existent name to use. Therefore no file system usage or the label was displayed. Bug 787181 - Fix detection of file system images 2017-09-10 Anders Jonsson Update Swedish translation 2017-09-09 Daniel Șerbănescu Update Romanian translation 2017-09-07 gogo Update Croatian translation 2017-09-03 Pali Rohár Update list of prohibited fat label characters (#787202) Add double quote (") to the list of prohibited FAT label characters, previously missed [1][2]. Also add single quote (') because mlabel encoded it in a way that both Windows and blkid don't understand, although mlabel can correctly decode it itself. # export MTOOLS_SKIP_CHECK=1 # mlabel ::"MIKE'S" -i /dev/sdf1 # mlabel -s :: -i /dev/sdf1 Volume label is MIKE'S (abbr=MIKE_S~1???) # blkid -o value -s LABEL /dev/sdf1 MIKE_S~1??? (8-bit characters in the above output have been replaced with question marks (?) just to keep this commit message as 7-bit ASCII). Finally exclude ASCII control characters below SPACE (0x00 to 0x1F) as they also cause mlabel to ask a question and wait for input in the same way that prohibited characters do. As discussed in the previous commit [1] the only way to stop GParted waiting forever is to manually kill mlabel with signal 9 (KILL). # mlabel ::"^A" -i /dev/sdf1 Long file name "^A" contains illegal character(s). a)utorename A)utorename-all r)ename R)ename-all s)kip S)kip-all q)uit (aArRsSq): [1] 584137b32b4deed2c20022628baaee6b38570fa5 Remove prohibited characters from FAT16/32 labels (#755608) [2] Microsoft TechNet: Label https://technet.microsoft.com/en-us/library/bb490925.aspx Bug 787202 - Update list of prohibited fat label characters 2017-09-05 Balázs Úr Update Hungarian translation 2017-09-04 Marek Cernocky Updated Czech translation 2017-09-03 Piotr Drąg Update Polish translation 2017-08-28 Mike Fleetwood Support /etc/fstab using Unicode labels as mount points (#786502) So far GParted is still loading the default non-reversible encoded labels from blkid in the initial loading of the FS_Info module cache. This encoded label is used to match LABEL=