The leading edge of GParted development is managed under the GNOME git
repository.
Browse
git visually or read GNOME
git instructions.
git clone https://gitlab.gnome.org/GNOME/gparted.git
cd gparted ./autogen.sh make
make install
git clone https://gitlab.gnome.org/GNOME/gparted.git
git config --global user.name "Joe Bloggs" git config --global user.email "joe.bloggs@example.com"
cd gparted git checkout -b feature
# Use favourite editor ./autogen.sh make su root -c src/gpartedbin
git add file1 file2 ... git commitCompose a suitable commit message:
Short one line summary of change (#999999)
Optional longer description explaining why the change is necessary.
Include details that will help the reviewer understand how the code
is broken and being fixed or why this change is an improvement.
Bug #999999 - GNOME Bugzilla one line summary
Formatting Tips
TIP: Improve Patch Readability
Make large and complicated changes as a series of smaller
changes by repeating steps 4 and 5 as necessary. Note that each
incremental patch should compile and run properly.
git format-patch master -n --stdout> ~/mypatch.mbox
cd /tmp git clone https://gitlab.gnome.org/GNOME/gparted.git gparted-test cd gparted-test git am ~/mypatch.mbox ./autogen.sh make su root -c src/gpartedbin
TIP: Ensure patch applies cleanly
When applying the patch, make sure it applies cleanly. For
example there should be no messages appearing such
as trailing whitespace.
See Bug
696471 - Fix trailing whitespace errors for a discussion of
why we only fix existing trailing whitespace in GParted
patch-by-patch, and for ideas on how to avoid trailing
whitespace.
NOTE: Ensuring that every change in a multi patch set compiles is important for incremental testability and enabling the use of git bisect in searching for the commit which introduced a bug.
mkdir -p ~/bin cd ~/bin wget https://raw.github.com/dustin/bindir/master/git-test-sequence chmod 755 git-test-sequence wget https://gitlab.gnome.org/GNOME/gparted/raw/master/testbuild.sh chmod 755 testbuild.sh
cd /tmp git clone https://gitlab.gnome.org/GNOME/gparted.git gparted-test cd gparted-test
git am ~/review-patchset.mbox git-test-sequence origin/master.. testbuild.sh
Further information on testbuild.sh and git-test-sequence follows.
testbuild.sh is for developers to build GParted in a git repository, appending the top commit and build results to the log file testbuild.log. It is intended for use with git-test-sequence to verify every commit in a patch set compiles, but it can be used standalone too.
Build current code:
rm testbuild.log testbuild.sh echo $? less testbuild.log
Parameters on the command line are passed to autogen.sh, which in turn are passed on to configure. See the INSTALL file for details on parameters to configure. Example:
testbuild.sh --prefix=/usr
By default testbuild.sh instructs make to use the number of processors in the machine as the number of jobs to run simultaneously. This is to minimise build time. This can be overridden by specifying the required parameters to make in the MAKEFLAGS environment variable. See make(1) for details of parameters to make. Example:
MAKEFLAGS='-j 2 -w' testbuild.sh
Build current code specifying both alternative make flags and configure parameters:
rm testbuild.log MAKEFLAGS='-j 2 -w' testbuild.sh --prefix=/usr echo $? less testbuild.log
git-test-sequence (blog: git test-sequence: Push Working Changes) allows a sequence of git commits to be tested. The range of commits is specified using standard git commit ranges syntax (about 2/3 down the page). Combined with testbuild.sh it allows us to verify every change of a patch set compiles.
Git-test-sequence records test results in the local git repository object store allowing it to report immediately when passed tests are re-run again.
Usage:
git-test-sequence <commit_range> <test_program>
Normal case would be to apply patch set for review and test build all commits between upstream master and current head:
cd /tmp git clone https://gitlab.gnome.org/GNOME/gparted.git gparted-test cd gparted-test git am ~/review-patchset.mbox git-test-sequence origin/master.. testbuild.sh
Test build a range of commits while also specifying parameters to configure and alternative make flags:
cd /tmp git clone https://gitlab.gnome.org/GNOME/gparted.git gparted-test cd gparted-test MAKEFLAGS='-j 2 -w' git-test-sequence GPARTED_0_14_1..GPARTED_0_15_0 'testbuild.sh --prefix=/usr'
On failure examine the log file testbuild.log for details.