[Mageia-sysadm] Initscripts - Migrating to git and regenerating mdkconf.patch and further Mageia tweaks.

Colin Guthrie mageia at colin.guthr.ie
Fri Oct 21 11:33:03 CEST 2011


Just to try and keep our initscripts package vaguely manageable, I've
been playing with git repositories.

The upstream RedHat sources are managed in git[1] and thus it should be
easier to migrate our patches when new versions come out.

In order to get some sense of what we, Mageia, have changed from the mdv
version we imported, I first imported the Mandriva SVN repository into
git via git-svn[2]

Using that git repository, I was able to find two specific commits
relating to the 9.21 version that we are currently using. These two
revisions related to the upstream 9.21 vendor branch drop into the mdv svn:

commit a108114a04f1b3b7878af695565b349c8f340d96
Author: bor <bor at 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>
Date:   Sat Nov 27 17:19:55 2010 +0000

    Load initscripts-9.21 into initscripts/branches/RedHat.

and the merge of said initscripts into the Mandriva modified branch:

commit 16def7de45bfe471abb646142f6ce35cf1d0b2f0
Author: bor <bor at 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>
Date:   Sat Nov 27 18:57:54 2010 +0000

    merge in initscripts-9.21


In theory, the differences between these two commits is what should make
up the "initscripts-mdvconf.patch" (the monster patch that adds all of
Mandriva's modifications).

So by creating a new branch (mga-9.21-patch-drop) of of the first commit
(a108114) and applying our current version of the
initscripts-mdvconf.patch (with some manual tweaks due to the
replacement of the po folder with a symlink which "patch" didn't really
like working with), I ended up with:

commit c2d4ed5e9c953f4a6da28d772532c60c8c910fe2
Author: Colin Guthrie <colin at mageia.org>
Date:   Mon Oct 17 20:57:16 2011 +0100

    Apply Mageia initscripts patch.

I could then compare (git diff 16def7..c2d4ed) the two versions. Apart
from the massive ChangeLog present in the mdv branch, the differences
were actually quite small, so I extracted these separately to a
temporary patch which I kept for later.

Then, I took, a fresh clone of the upstream fedora initscripts git
repository (which I've ultimately pushed to [3]). From now on any
references and sha1 will refer to this repository (the svn imported one
is no longer used).

I then created a branch from the upstream 9.25 commit:

commit 4688ea25c9a5a87e48f89fc91a3c93a7c8c95b4a
Author: Bill Nottingham <notting at redhat.com>
Date:   Fri Feb 25 15:15:29 2011 -0500

    Update to 9.25-1

and applied the current version of the initscripts-mdkconf.patch from
Mandriva's SVN repository which had been updated to initscripts 9.25.

I saved this to a new branch called mga-9.21-mdkconf which resulted in:

commit be75c98a06d569fbaa2d86f92676af961795d094
Author: Colin Guthrie <colin at mageia.org>
Date:   Fri Oct 21 01:28:48 2011 +0100

    Add the mdkconf patch

I then created a new branch from this called mga-9.25-branding and
reapplied the small differences we'd made to the 9.21 version of the
mdkconf patch which I saved above. I made a couple extra further changes
on top of that:

commit 29aae08c5860326975c91834ee9aa9560b4ef7da
Author: Colin Guthrie <colin at mageia.org>
Date:   Mon Oct 17 21:38:04 2011 +0100

    Apply Mageia branding patch

commit 43858a6b877a6ca5e947dda16ffc11351c3a811f
Author: Colin Guthrie <colin at mageia.org>
Date:   Mon Oct 17 21:41:32 2011 +0100

    A few more Mageia branding changes.

Then I created yet another branch called mga-9.25-patches, and applied
any additional patches from the current SPEC file that were not yet applied.

This resulted in the followed commits:

commit 27994d6d04def1cb1ec9e0cc591e397eede74373
Author: Colin Guthrie <colin at mageia.org>
Date:   Mon Oct 17 21:45:41 2011 +0100

    Remove trailing slash in TMP/TMPDIR.

    When building gcc/ecj1, TMP/TMPDIR is used and this results in debugedit
    being unhappy.

    (patch originally from svn: 77112 rtp  - Remove trailing whitespace
at the end of TMPDIR/TMP)

commit 0068234306f56d9c339a0f3c395516d04635cfb8
Author: anssi <anssi at 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>
Date:   Sun Apr 17 11:31:24 2011 +0000

    rc.sysinit: Do not use speedboot if display_driver_helper says so
(reasons include queued dkms update later in the boot or a conflicting
driver loaded by initrd, in which case the user is asked to reboot by
harddrake later). This has no effect under systemd.


commit d6df24da00ad9283e26b0ae7bda65c00f4f750cd
Author: Thomas Backlund <tmb at mageia.org>
Date:   Mon Oct 17 21:54:48 2011 +0100

    Replace LANG with LC_ALL


commit 448ff89ce545b3ad6ceb83c99fa2f0037b9b97db
Author: Jari <lihamakaroonilaatikko at gmail.com>
Date:   Mon May 23 11:44:05 2011 +0000

    Fix password prompt for encrypted partitions

    Bug #1290

commit 5d2b37c21bd6e674969b5b0fa742fb175dde7499
Author: Jari <lihamakaroonilaatikko at gmail.com>
Date:   Mon May 23 11:46:51 2011 +0000

    Limit the number of tries to unlock

    Bug #1290

commit d34d3fe37f4f2702bf1c58c94704c8a061681010
Author: Olivier Blin <mageia at blino.org>
Date:   Sat May 28 13:52:38 2011 +0200

    run chvt with --userwait option at shutdown to avoid hanging waiting
for chvt 1, since dm stop might have triggered a vt change as well
details from vuntz on
https://bugzilla.novell.com/show_bug.cgi?id=540482#c115 (happens on my
laptop with Mobility Radeon 9600 M10, plymouth disabled)

So with these three branches in place I was able to do the following:

$ git diff initscripts-9.25-1..mga-9.25-mdkconf >initscripts-mdkconf.patch

This regenerated a suitable monster patch.

$ git format-patch --start-number 100 mga-9.25-mdkconf..mga-9.25-branding

This resulted in the following patches:


and finally:

$ git format-patch --start-number 200 mga-9.25-branding..mga-9.25-patches

which resulted in the following patches:


These files then made up the new initscripts spec file (not yet
committed to svn).

Phew! Just wanted to document the process to make sure I've not done
anything dumb/stupid. We can of course roll up all the small patches,
branding, etc. into the mdkconf branch and just generate one monster
patch in the future, but I wanted to have clear separation at least

If people want to double check this work, it would be much appreciated.

Hope that's all clear.


1. git://git.fedorahosted.org/initscripts.git
2. git://git.mageia.org/initscripts-mdv
3. git://git.mageia.org/initscripts

I recommend adding the following to your ~/.gitconfig:

[url "git://git.mageia.org/"]
        insteadof = mga:
[url "ssh://git.mageia.org/git/"]
        pushInsteadof = mga:

This way you can do: "git clone mga:initscripts" or "git clone
mga:initscripts-mdv". Cloning will use the (lower overhead) git
protocol, whereas push will use SSH (provided you have SSH commit rights
of course).


Colin Guthrie

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/

More information about the Mageia-sysadm mailing list