gparted/src/Makefile.am

88 lines
1.7 KiB
Makefile
Raw Permalink Normal View History

AM_CPPFLAGS = \
-I$(top_srcdir)/include \
$(GTHREAD_CFLAGS) \
$(GTKMM_CFLAGS) \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\"
2004-09-19 14:24:53 -06:00
AM_CFLAGS = -Wall
2004-09-19 14:24:53 -06:00
AM_CXXFLAGS = -Wall
2004-09-19 14:24:53 -06:00
libexec_PROGRAMS = gpartedbin
2004-09-19 14:24:53 -06:00
gpartedbin_SOURCES = \
BCache_Info.cc \
Create BlockSpecial class and use in LVM2_PV_Info (#767842) In some cases creating an LVM2 Physical Volume on top of a DMRaid array reports no usage information and this partition warning: Unable to read the contents of this file system! Because of this some operations may be unavailable. The cause might be a missing software package. The following list of software packages is required for lvm2 pv file system support: lvm2. For example on Ubuntu 14.04 LTS (with GParted built with --enable-libparted-dmraid) create an LVM2 PV in a DMRaid array partition. GParted uses this command: # lvm pvcreate -M 2 /dev/mapper/isw_bacdehijbd_MyArray0p2 But LVM reports the PV having a different name: # lvm pvs PV VG Fmt Attr PSize PFree /dev/disk/by-id/dm-name-isw_bacdehijbd_MyArray0p2 lvm2 a-- 1.00g 1.00g This alternate name is loaded into the LVM2_PV_Info module cache. Hence when GParted queries partition /dev/mapper/isw_bacdehijbd_MyArray0p2 it has no PV information against that name and reports unknown usage. However they are actually the same block special device; major 252, minor 2: # ls -l /dev/mapper/isw_bacdehijbd_MyArray0p2 brw-rw---- 1 root disk 252, 2 Jul 2 11:09 /dev/mapper/isw_bacdehijbd_MyArray0p2 # ls -l /dev/disk/by-id/dm-name-isw_bacdehijbd_MyArray0p2 lrwxrwxrwx 1 root root 10 Jul 2 11:09 /dev/disk/by-id/dm-name-isw_bacdehijbd_MyArray0p2 -> ../../dm-2 # ls -l /dev/dm-2 brw-rw---- 1 root disk 252, 2 Jul 2 11:09 /dev/dm-2 To determine if two names refer to the same block special device their major, minor numbers need to be compared, instead of string comparing their names. Implement class BlockSpecial which encapsulates the name and major, minor numbers for a block special device. Also performs comparison as needed. See bug 767842 comments 4 and 5 for further investigation and decision for choosing to implement a class. Replace name strings in the LVM2_PV_Info module with BlockSpecial objects performing correct block special device comparison. Bug 767842 - File system usage missing when tools report alternate block device names
2016-06-22 10:32:01 -06:00
BlockSpecial.cc \
CopyBlocks.cc \
DMRaid.cc \
Device.cc \
DialogFeatures.cc \
DialogManageFlags.cc \
DialogPasswordEntry.cc \
Dialog_Base_Partition.cc \
Dialog_Disklabel.cc \
Dialog_FileSystem_Label.cc \
Dialog_Partition_Copy.cc \
Dialog_Partition_Info.cc \
Dialog_Partition_Name.cc \
Dialog_Partition_New.cc \
Dialog_Partition_Resize_Move.cc \
Dialog_Progress.cc \
DrawingAreaVisualDisk.cc \
FS_Info.cc \
FileSystem.cc \
Frame_Resizer_Base.cc \
Frame_Resizer_Extended.cc \
GParted_Core.cc \
HBoxOperations.cc \
LVM2_PV_Info.cc \
LUKS_Info.cc \
MenuHelpers.cc \
Mount_Info.cc \
Operation.cc \
OperationChangeUUID.cc \
OperationCheck.cc \
OperationCopy.cc \
OperationCreate.cc \
OperationDelete.cc \
OperationDetail.cc \
OperationFormat.cc \
OperationLabelFileSystem.cc \
OperationNamePartition.cc \
OperationResizeMove.cc \
OptionComboBox.cc \
Partition.cc \
PartitionLUKS.cc \
PartitionVector.cc \
Add PasswordRAMStore module (#795617) Application level requirements for secure password management were set out in "LUKS password handling, threats and preventative measures" [1]. The requirements are: 1) Passwords are stored in RAM and are not allowed to be paged to swap. (However hibernating with GParted still running will write all of RAM to swap). 2) Passwords are wiped from RAM when no longer needed. When each password is no longer needed and when GParted closes. 3) Passwords are referenced by unique key. Recommend using LUKS UUIDs as the unique key. (Each LUKS password should only ever need to be entered once for each execution of GParted. Therefore the passwords can't be stored in any of the existing data structures such as Partitions or LUKS_Info cache because all of these are cleared and reloaded on each device refresh). There seems to be two possible implementation methods: use an existing library to provide secure memory handling, or write our own. Libgcrypt [2] and libsodium [3] cryptographic libraries both provide secure memory handling. (Secure memory is quite simple really, some virtual memory locked into RAM which is zeroed when no longer needed). Linking to an encryption library just to provide secure memory seems like using a sledge hammer to crack a nut. Also because of requirement (3) above a module is needed to "own" the pointers to the passwords in the secure memory. Managing the secure memory ourselves is probably no more code that that needed to interface to libgcrypt. Therefore handle the secure memory ourselves. So far the module is only compiled. It is not used anywhere in GParted. [1] LUKS password handling, threats and preventative measures https://bugzilla.gnome.org/show_bug.cgi?id=627701#c56 [2] libgcrypt general purpose cryptographic library, as used in GNU Privacy Guard https://gnupg.org/related_software/libgcrypt/ [3] libsodium crypto library https://download.libsodium.org/doc/ Bug 795617 - Implement opening and closing of LUKS mappings
2017-10-06 13:50:41 -06:00
PasswordRAMStore.cc \
PipeCapture.cc \
Proc_Partitions_Info.cc \
Write a generic progress bar class (#760709) Write a generic progress bar class. Has the following features: * Has separate progress and target numbers, rather than a single completion fraction, to enable the the next feature. * Optionally generates text reporting the amount of data copied using the progress and target numbers like this: "1.00 MiB of 16.00 MiB copied" * After running for 5 seconds, also add estimated remaining time. (Waits to allow the data copying rate to settle down a little before estimating the remaining time). Looks like this: "1.00 MiB of 16.00 MiB copied (00:01:59) remaining)" The ProgressBar class is not driving the visual progress bar yet. It has just been added into the internal block copy algorithm and generates debug messages showing the progress bar is operating correctly. Debugging looks like this: DEBUG: ProgressBar::start(target=2.0636e+09, text_mode=PROGRESSBAR_TEXT_COPY_BYTES) DEBUG: ProgressBar::update(progress=1.30023e+08) m_fraction=0.0630081 m_text="124.00 MiB of 1.92 GiB copied" DEBUG: ProgressBar::update(progress=2.67387e+08) m_fraction=0.129573 m_text="255.00 MiB of 1.92 GiB copied" DEBUG: ProgressBar::update(progress=4.0475e+08) m_fraction=0.196138 m_text="386.00 MiB of 1.92 GiB copied" ... DEBUG: ProgressBar::update(progress=1.13351e+09) m_fraction=0.549289 m_text="1.06 GiB of 1.92 GiB copied (00:00:04 remaining)" DEBUG: ProgressBar::update(progress=1.26249e+09) m_fraction=0.611789 m_text="1.18 GiB of 1.92 GiB copied (00:00:04 remaining)" DEBUG: ProgressBar::update(progress=1.39041e+09) m_fraction=0.67378 m_text="1.29 GiB of 1.92 GiB copied (00:00:03 remaining)" ... DEBUG: ProgressBar::update(progress=1.97552e+09) m_fraction=0.957317 m_text="1.84 GiB of 1.92 GiB copied (00:00:00 remaining)" DEBUG: ProgressBar::update(progress=2.0636e+09) m_fraction=1 m_text="1.92 GiB of 1.92 GiB copied" DEBUG: ProgressBar::stop() Bug 760709 - Add progress bars to XFS and EXT2/3/4 file system specific copy methods
2016-01-11 05:19:05 -07:00
ProgressBar.cc \
SupportedFileSystems.cc \
Detect Linux SWRaid members by querying mdadm (#756829) Detection of Linux SWRaid members currently fails in a number of cases: 1) Arrays which use metadata type 0.90 or 1.0 store the super block at the end of the partition. So file system signatures in at least linear and mirrored arrays occur at the same offsets in the underlying partitions. As libparted only recognises file systems this is what is detected, rather than an SWRaid member. # mdadm -E -s -v ARRAY /dev/md/1 level=raid1 metadata=1.0 num-devices=2 UUID=15224a42:c25bbcd9:15db6000:4e5fe53a name=chimney:1 devices=/dev/sda1,/dev/sdb1 ... # wipefs /dev/sda1 offset type ---------------------------------------------------------------- 0x438 ext4 [filesystem] LABEL: chimney-boot UUID: 10ab5f7d-7d8a-4171-8b6a-5e973b402501 0x1fffe000 linux_raid_member [raid] LABEL: chimney:1 UUID: 15224a42-c25b-bcd9-15db-60004e5fe53a # parted /dev/sda print Model: ATA VBOX HARDDISK (scsi) Disk /dev/sda: 34.4GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 538MB 537MB primary ext4 boot, raid ... 2) Again with metadata type 0.90 or 1.0 arrays blkid may report the contained file system instead of an SWRaid member. Have a single example of this configuration with a mirrored array containing the /boot file system. Blkid reports one member as ext4 and the other as SWRaid! # blkid | egrep 'sd[ab]1' /dev/sda1: UUID="10ab5f7d-7d8a-4171-8b6a-5e973b402501" TYPE="ext4" LABEL="chimney-boot" /dev/sdb1: UUID="15224a42-c25b-bcd9-15db-60004e5fe53a" UUID_SUB="0a095e45-9360-1b17-0ad1-1fe369e22b98" LABEL="chimney:1" TYPE="linux_raid_member" Bypassing the blkid cache gets the correct result. # blkid -c /dev/null /dev/sda1 /dev/sda1: UUID="15224a42-c25b-bcd9-15db-60004e5fe53a" UUID_SUB="d0460f90-d11a-e80a-ee1c-3d104dae7e5d" LABEL="chimney:1" TYPE="linux_raid_member" However this can't be used because if a user has a floppy configured in the BIOS but no floppy attached, GParted will wait for minutes as the kernel tries to access non-existent hardware on behalf of the blkid query. See commit: 18f863151c82934fe0a980853cc3deb1e439bec2 Fix long scan problem when BIOS floppy setting incorrect 3) Old versions of blkid don't recognise SWRaid members at all so always report the file system when found. Occurs with blkid v1.0 on RedHat / CentOS 5. The only way I can see how to fix all these cases is to use the mdadm command to query the configured arrays. Then use this information for first choice when detecting partition content, making the order: SWRaid members, libparted, blkid and internal. GParted shell wrapper already creates temporary blank udev rules to prevent Linux Software RAID arrays being automatically started when GParted refreshes its device information[1]. However an administrator could manually stop or start arrays or change their configuration between refreshes so GParted must load this information every refresh. On my desktop with 4 internal hard drives and 3 testing Linux Software RAID arrays, running mdadm adds between 0.20 and 0.30 seconds to the device refresh time. [1] a255abf3432ad106fac9c766f0816ada20be8e42 Prevent GParted starting stopped Linux Software RAID arrays (#709640) Bug 756829 - SWRaid member detection enhancements
2015-10-20 13:52:19 -06:00
SWRaid_Info.cc \
TreeView_Detail.cc \
Utils.cc \
Win_GParted.cc \
btrfs.cc \
exfat.cc \
ext2.cc \
f2fs.cc \
fat16.cc \
hfs.cc \
hfsplus.cc \
jfs.cc \
linux_swap.cc \
lvm2_pv.cc \
luks.cc \
main.cc \
minix.cc \
nilfs2.cc \
ntfs.cc \
reiser4.cc \
reiserfs.cc \
udf.cc \
xfs.cc
gpartedbin_LDADD = $(GTHREAD_LIBS) $(GTKMM_LIBS)
2004-09-19 14:24:53 -06:00