Commit Graph

43 Commits

Author SHA1 Message Date
Curtis Gedak 9f6110ce4c Append -git to version for continuing development 2015-03-23 09:44:54 -06:00
Curtis Gedak 0d4ea36d41 ========== gparted-0.22.0 ========== 2015-03-23 09:29:03 -06:00
Mike Fleetwood 9c1a833a0d Fix failure to recognise whole disk file systems in certain cases (#743181)
When the following conditions were met GParted would fail to recognise a
newly created whole disk device file system, and instead show an unknown
file system filling the disk:

1) Disk was previously partitioned and contained at least one partition.

2) Using libparted version 2.0 to 3.0 inclusive.

Initial status:
    # blkid | fgrep sdc
    # fgrep sdc /proc/partitions
       8       32  976762584 sdc
       8       33  104857600 sdc1
    # parted /dev/sdc
    GNU Parted 2.4
    Using /dev/sdc
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted) print
    Model: ATA ST1000LM024 HN-M (scsi)
    Disk /dev/sdc: 1000GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: msdos

    Number  Start   End    Size   Type     File system  Flags
     1      1049kB  107GB  107GB  primary

When creating the loop partition table libparted would not inform the
kernel to delete the old partitions.  /proc/partitions still contained
the details of the old partitions.
    (parted) mktable loop
    Warning: The existing disk label on /dev/sdc will be destroyed and
    all data on this disk will be lost. Do you want to continue?
    Yes/No? Yes
    (parted) print
    Model: ATA ST1000LM024 HN-M (scsi)
    Disk /dev/sdc: 1000GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: loop

    Number  Start  End  Size  File system  Flags

    (parted) quit
    # fgrep sdc /proc/partitions
       8       32  976762584 sdc
       8       33  104857600 sdc1

Creation of the whole disk device file system goes unnoticed by blkid
because the kernel and therefore blkid's cache have stale partition
information.
    # mkfs.xfs -f /dev/sdc
    # blkid | fgrep sdc

NOTE:
On a Linux Software RAID array, as opposed to a hard disk, blkid does
notice creation of the whole disk device file system.  However the
kernel still has old partition details.

This was fixed in libparted 3.1 by commit:

    http://git.savannah.gnu.org/cgit/parted.git/commit/?id=f5c909c0cd50ed52a48dae6d35907dc08b137e88
    libparted: remove has_partitions check to allow loopback partitions

Fix by deleting old partitions before creating the loop table when
compiled with a broken version of libparted.  The GParted UI provides
no feedback while a new partition table is created, and with some
versions of GTK the UI become unresponsive too, so it is important to be
as fast as possible.  Evaluated three different methods, deleting 15 and
22 MSDOS partitions on a physical 5400 RPM hard drive using libparted
2.4:

M1) Delete and commit one partition at a time.
    Takes up to 24 seconds to delete 15 partitions.  With 22 partitions
    libparted always reports finding some of the partitions busy and
    unable to inform the kernel about the modifications.
    Too slow and doesn't work.

M2) Delete all partitions in one go and commit once.
    Takes up to 1.4 seconds to delete either 15 or 22 partitions.  Never
    removes partitions 17 and higher from the kernel.
    Doesn't work.

M3) Write GPT table (letting libparted delete any old partitions).
    Takes up to 0.8 seconds to delete either 15 or 22 partitions.
    Fast and works.

Use method 3 - write a GPT table thus using libparted code to inform the
kernel of the old partition deletions.

Bug 743181 - Add unpartitioned drive read-write support
2015-03-09 11:04:13 -06:00
Curtis Gedak d916cee115 Append -git to version for continuing development 2015-01-26 10:35:31 -07:00
Curtis Gedak 23091fbee7 ========== gparted-0.21.0 ========== 2015-01-26 10:01:46 -07:00
Mike Fleetwood 6304377811 Correctly capitalise GNOME in the Manual and man page (#739805)
The GNOME Logo & Trademarks page
(http://www.gnome.org/logo-and-trademarks/) says:
    * All the letters in "GNOME" should be capitalized.

Also correctly capitalise the program name as GNOME Partition Editor in
the Manual, and gparted.doap file (used in web git browser).

Bug 739805 - GNOME is incorrectly capitalised on the website and else
             where
2014-12-20 10:02:55 -07:00
Mike Fleetwood 5a93a9c432 Avoid splitting Autoconf check message for libparted version (#740004)
First use of PKG_CHECK_EXISTS causes additional checking messages to be
reported which splits the libparted version check message from it's
result, like this:

    checking for libparted >= 1.7.1 (querying pkg-config)... checking for pkg-config... /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    2.3

Call PKG_CHECK_EXISTS early, before first use to avoid this.  Output
now looks like:

    checking for pkg-config... /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    :
    checking for libparted >= 1.7.1 (querying pkg-config)... 2.3

Bug 740004 - use pkg-config to check for version of libparted
2014-11-20 14:59:56 -07:00
Mike Fleetwood 9c7cb6f496 Use pkg-config Autoconf check for libparted version first (#740004)
Currently ./configure links and runs a program to query the libparted
library version, which is used to determine the availability of some
features.  This makes cross-compiling harder because the compile host
has to fake a virtual installation target in which to run the check.
Because of this, pkg-config based Autoconf checks are preferred.

Switch to using a pkg-config based Autoconf check first to determine the
version of libparted, falling back to the previous method for older
distributions which don't provide a pkg-config file for libparted.

Also small comment tidy-up elsewhere.

Bug 740004 - use pkg-config to check for version of libparted
2014-11-20 14:59:56 -07:00
Curtis Gedak ad6f73a5f6 Append -git to version for continuing development 2014-10-20 10:02:21 -06:00
Curtis Gedak ce77fff15d ========== gparted-0.20.0 ========== 2014-10-20 09:27:51 -06:00
Mike Fleetwood 20158f0440 Tidyup Autoconf check for --disable-doc (#734076)
Use AC_ARG_ENABLE() and AS_HELP_STRING() macros to improve handling of
the --disable-doc option.

Change the names, and sence, of the Autoconf and Automake definitions
used to control building of the help documentation.  Reasons are:
(1) Switch from negative to positive statements which are more natural
    to comprehend.
(2) Insert HELP in the names from *_DOC to *_HELP_DOC as they control
    building of the documentation in the help subdirectory, not the
    manual page in the doc directory.

Autoconf: HAVE_DISABLE_DOC -> ENABLE_HELP_DOC
Automake: DISABLE_DOC      -> BUILD_HELP_DOC

Bug #734076 - Autodetect parted online partition resizing capability
2014-08-31 11:04:36 -06:00
Mike Fleetwood 5c73f3de57 Tidy up Autoconf check for --enable-libparted-dmraid (#734076)
Use AC_ARG_ENABLE() Autoconf macro to set enable_libparted_dmraid
variable to either yes or no in all cases, whether set on the command
line or not.  Use AS_HELP_STRING() macro to format the option help text.

Bug #734076 - Autodetect parted online partition resizing capability
2014-08-31 11:04:36 -06:00
Mike Fleetwood af05344095 Automatically enable online resize with libparted >= 3.2 (#734076)
Configure script checks for libparted version >= 3.2 to automatically
determine the availability of online resize capability in libparted.
This can be overridden from the ./configure command line.  Override
enable when an older version of libparted has been patched to include
online resize support with:

    ./configure --enable-online-resize

Override disable with libparted 3.2 or later to disable the feature when
it is not wanted with:

    ./configure --disable-online-resize

Note that GParted also requires, and checks for at runtime, Linux
kernel >= 3.6 for online resize support.  See commit for more details:

    de2844d02d
    Add online resize support (#694622)

Bug #734076 - Autodetect parted online partition resizing capability
2014-08-31 11:04:35 -06:00
Mike Fleetwood 3030118caf Pass link libraries via LIBS variable into Makefiles (#734718)
Currently -lparted is passed to the linker by being hard coded in the
gpartedbin_LDFLAGS variable in src/Makefile.am and -lparted-fs-resize
by conditionally being appended to the gpartedbin_LDFLAGS.

Add an Autoconf AC_CHECK_LIB check for the parted library using it's
default action-if-found to extend LIBS.  Update the existing
AC_CHECK_LIB check for the parted-fs-resize library so that the
overridden action-if-found also extends LIBS with -lparted-fs-resize.
These libraries are then assigned via the LIBS variable in the
generated Makefiles.

This matches how the other libraries, dl and uuid, were found in the
configure script and passed to the Makefiles.

Bug #734718 - Update Autoconf version specific libparted checks and
              defines to feature specific ones
2014-08-18 15:48:34 -06:00
Mike Fleetwood bb17f44e99 Only check libparted version once and cache the result (#734718)
Configure.ac still builds and runs very similar test executables twice
to determine in the version of libparted is >= minimum require 1.7.1 and
2.2 for improved partition re-read code.

Build and run a single test to determine the version of libparted and
cache the result.  Use this cached version number when testing the
version of libparted.  Inspired by the version checking for intltool
from /usr/share/aclocal/intltool.m4.

Bug #734718 - Update Autoconf version specific libparted checks and
              defines to feature specific ones
2014-08-18 15:48:34 -06:00
Mike Fleetwood 080b3b080d Only check for ped_file_system_resize() once if possible (#734718)
If ped_file_system_resize() function is found in the parted library
don't bother to go on to check for it in the parted-fs-resize library.

Bug #734718 - Update Autoconf version specific libparted checks and
              defines to feature specific ones
2014-08-18 15:48:34 -06:00
Mike Fleetwood ed4ea6cf03 Rename HAVE_LIBPARTED_2_2_0_PLUS define into feature names (#734718)
Remove HAVE_LIBPARTED_2_2_0_PLUS definition

Rename version specific #define HAVE_LIBPARTED_2_2_0_PLUS into two
separate feature specific names set as required:

    Name                                  Set when?

    ENABLE_PT_REREAD_WORKAROUND           (libparted < 2.2)
    USE_LIBPARTED_LARGE_SECTOR_SUPPORT    (libparted >= 2.2)

Using feature specific #defines is the standard Autoconf way and makes
the resultant conditional code easier to understand.  Still have to
check the version of libparted though.

Bug #734718 - Update Autoconf version specific libparted checks and
              defines to feature specific ones
2014-08-18 15:48:34 -06:00
Mike Fleetwood eb7b706f23 Use specific Autoconf check for FS resize capability in libparted (#734718)
Replace Autoconf check for libparted >= 3.0

Currently uses a custom check which compiles an executable to check for
libparted version >= 3.0 to determine if the ped_file_system_resize()
function exists in the parted library.

Change to use a direct Autoconf check to determine the availability of
the ped_file_system_resize() function in the parted library.

Bug #734718 - Update Autoconf version specific libparted checks and
              defines to feature specific ones
2014-08-18 15:48:34 -06:00
Mike Fleetwood 288c4dbf2e Remove little used HAVE_LIBPARTED_3_0_0_PLUS definition (#734718)
Remove HAVE_LIBPARTED_3_0_0_PLUS definition

The #define only controls whether fat16 and fat32 file systems are moved
by libparted (for versions <= 2.4) or the GParted internal algorithm
(for libparted versions >= 3.0).  See this commit for more details:
    0fda1d011d
    Enable new fs resize library available with parted-3.1 (#668281)

As nearly all other file system are moved using the GParted internal
algorithm, just always use it to move fat16 and fat32 file systems too.

Bug #734718 - Update Autoconf version specific libparted checks and
              defines to feature specific ones
2014-08-18 15:48:34 -06:00
Mike Fleetwood c1db9811e1 Use Autoconf check specifically for libparted-fs-resize (#734718)
Remove HAVE_LIBPARTED_3_1_0_PLUS definition and replace Autoconf
    check for libparted >= 3.1

Currently uses custom check which compiles an executable to check for
libparted version >= 3.1 to determine the availability of the library
parted-fs-resize and the need to include the header <parted/filesys.h>.

Change to use a direct Autoconf check to determine the availability of
the ped_file_system_resize() function in the parted-fs-resize library.
Remove inclusion of the header <parted/filesys.h> as it has always been
included via <parted/parted.h>, at least as far back as parted 1.8.0,
and even in parted 3.0 when ped_file_system_resize() and libparted file
system resize capability didn't exist.

Bug #734718 - Update Autoconf version specific libparted checks and
              defines to feature specific ones
2014-08-18 15:48:34 -06:00
Mike Fleetwood 654cdc7335 Update AM_PROG_LIBTOOL to AC_PROG_LIBTOOL in configure.ac (#734718)
AM_PROG_LIBTOOL is an old name and alias for AC_PROG_LIBTOOL.  Update.

NOTE:
In turn AC_PROG_LIBTOOL is an old name and alias for LT_INIT, but
CentOS 5.x with libtool 1.5.22 doesn't have LT_INIT defined in
/usr/share/aclocal/libtool.m4 serial 48, only AC_PROG_LIBTOOL and
AM_PROG_LIBTOOL.  Therefore only update to AC_PROG_LIBTOOL and not
LT_INIT while CentOS 5.x is supported.

Bug #734718 - Update Autoconf version specific libparted checks and
              defines to feature specific ones
2014-08-18 15:48:34 -06:00
Mike Fleetwood 2cd82dfc38 Removed unused variable need_work_around from configure.ac (#734718)
Bug #734718 - Update Autoconf version specific libparted checks and
              defines to feature specific ones
2014-08-18 15:48:34 -06:00
Mike Fleetwood b1c64fdf0d Make ./configure fail when C++ compiler is missing (#732803)
Currently ./configure passes successfully even if a C++ compiler is not
installed.  The first time building the code fails is when make tries
to compile the first C++ source file and the compiler executable is not
found.

Also because there is no C++ compiler the autoconf generated test for
Gtk::Window::set_default_icon_name() will always fail, leaving
HAVE_SET_DEFAULT_ICON_NAME unset.  Therefore as well as installing a
C++ compiler, ./configure must be run again to correctly test for
set_default_icon_name().

This is as a result of a little known consequence of having AC_PROG_CC
proceed AC_PROG_CXX in the autoconf file configure.ac.
    Subject: AC_PROG_CXX behaviour when no C++ compiler is found
    http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00001.html

Reverse the order, placing AC_PROG_CXX before AC_PROG_CC, so that the
generated ./configure script fails with an error if there is no C++
compiler available.

Bug #732803 - ./configure is successful even when C++ compile is missing
2014-07-20 09:18:39 -06:00
Curtis Gedak 1e007757a9 Append -git to version for continuing development 2014-07-15 10:46:24 -06:00
Curtis Gedak 6edab65026 ========== gparted-0.19.1 ========== 2014-07-15 09:39:15 -06:00
Curtis Gedak e339b38fdf Append -git to version for continuing development 2014-06-10 11:14:43 -06:00
Curtis Gedak 2e065810ce ========== gparted-0.19.0 ========== 2014-06-10 10:24:51 -06:00
Curtis Gedak a8bd849d8b Append -git to version for continuing development 2014-02-19 11:13:38 -07:00
Curtis Gedak d5d80d0942 ========== gparted-0.18.0 ========== 2014-02-19 09:59:45 -07:00
Curtis Gedak 6b077f2d71 Append -git to version for continuing development 2013-12-09 11:19:23 -07:00
Curtis Gedak 78890e3fbc ========== gparted-0.17.0 ========== 2013-12-09 10:04:05 -07:00
Phillip Susi de2844d02d Add online resize support (#694622)
Many file systems are capable of growing while mounted, and a few can
even shrink.  This support must be explicitly enabled at configure time
with the --enable-online-resize flag and depends on a patched libparted.
Also requires kernel >= 3.6 for partition resizing, even if the
partition is in use (BLKPG_RESIZE_PARTITION).

Thanks to Mike Fleetwood for double check mark idea instead of a second
column to show the online grow/shrink.

Bug #694622 - Add support for online resize
2013-11-24 10:10:37 +00:00
Curtis Gedak a5bd5f28c5 Append -git to version for continuing development 2013-09-18 10:18:13 -06:00
Curtis Gedak eb7afd6791 ========== gparted-0.16.2 ========== 2013-09-18 09:37:00 -06:00
Curtis Gedak e5a426d0b3 Add xdg-su program to gparted.desktop file (#699626)
Add xdg-su to list of graphical switch-to-root programs to be
considered for gparted.desktop file.

The openSUSE GNU/Linux distribution includes the program xdg-su by
default for graphically prompting for root privilege.

This enhancement enables a user to compile and install gparted from
source code on openSUSE and have the gparted menu entry graphically
prompt for root privilege.

Bug #699626 - Enable gparted.desktop to prompt for root on default
              openSUSE installation
2013-05-05 11:48:56 +01:00
Curtis Gedak c532db0e55 Append -git to version for continuing development 2013-04-30 10:36:02 -06:00
Curtis Gedak 24458c2224 ========== gparted-0.16.1 ========== 2013-04-30 09:17:54 -06:00
Mike Fleetwood b7b2af4f5e Fix autoconf check for set_default_icon_name method (#695279)
The autoconf check for the Gtk::Window::set_default_icon_name() method
was failing to detect its availability, but only on Ubuntu >= 11.10.

Turns out that the autoconf check incorrectly defined the link libraries
via the C++ flags variable CXXFLAGS, rather than the LIBS variable.
This resulted in the libraries being specified in the wrong order on the
command line.  The test only failed when Ubuntu also added the
"--as-needed" flag to the linker by default [1] which required the
libraries to be correctly specified at the end of the command line.

[1] Ubuntu 11.10 Release Notes, GCC 4.6 Toolchain
    https://wiki.ubuntu.com/OneiricOcelot/ReleaseNotes#GCC_4.6_Toolchain

This fixes commit:

    a042107883
    Only use Gtk::Window::set_default_icon_name method when available

Bug #695279 - GParted doesn't compile on RHEL / CentOS 5.9
2013-04-29 15:42:18 -06:00
Mike Fleetwood d6baac2546 Only install fallback icon when required (#695279)
Applications are moving away from storing icons in /usr/share/pixmaps,
instead preferring /usr/share/icons/hicolor/$SIZE/apps, so only install
the fallback icon when GParted requires it.

Bug #695279 - GParted doesn't compile on RHEL / CentOS 5.9
2013-04-28 13:51:06 -06:00
Curtis Gedak ead2a1a53f Append -git to version for continuing development 2013-04-24 10:37:43 -06:00
Curtis Gedak 02d3d4a217 ========== gparted-0.16.0 ========== 2013-04-24 09:13:44 -06:00
Mike Fleetwood 12d2cad682 Add autoconf checking messages for two checks
Make the generated configure script additionally report these two checks
with their outcome:
    checking for gtk_show_uri function... yes
    checking for Gtk::MessageDialog::get_message_area() method... yes
2013-03-20 11:46:20 -06:00
Mike Fleetwood 40fb05f043 Modernise to a minimum of autoconf 2.50
1)  Require autoconf >= 2.50
    (Released May 2001).

2)  Rename file to configure.ac
    (Recommended with autoconf >= 2.50).

3)  Update macro from AC_TRY_RUN to AC_RUN_IFELSE
    (As wanted by the autoupdate program).
2013-03-20 11:46:20 -06:00