How to fix a bug inside ubiquity localechooser-post-base-installer.patch

Asked by esmaeelE

Hi, I want to fix installer bug that reported in

https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1891270

The change made on this `localechooser-post-base-installer.patch` file.
This is only one line addition to add default language for IRAN.

I think I commit in a wrong branch, is it correct?

How and when this fix will release in UBUNTU?

Is it possible to add this fix in next release?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu ubiquity Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

I am no expert on that matter, but it seems to me that the modification on the patch file is wrong.

If my interpretation of the file is correct, then there is a + sign missing at the beginning of the line that you added, similar to those before and after.

Revision history for this message
esmaeelE (esmaeele) said :
#2

I think my question relate to this fix commit
https://git.launchpad.net/ubiquity/commit/?id=6423d4b8

My proposed fix commit just only add one line.
IR) deflang=fa ;;

What I want to know is after cloning the ubiquity repository with
git clone https://git.launchpad.net/ubuntu/+source/ubiquity

Which branch I must use for commit?

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

I doubt that you can upload your change to the repository, because that needs certain rights.
If you look at https://code.launchpad.net/ubuntu/+source/ubiquity you most probably will see "You cannot push directly to this repository. Members of Ubuntu Server Dev import team can push to this repository."

Remark:
The way that you have formatted the change seems wrong to me.
It is needed that the line for IR looks exactly the same as the other ones (including tabs and space characters and the plus sign).

Revision history for this message
esmaeelE (esmaeele) said (last edit ):
#4

OK, I change that line.
Add leading + sign, and make it same as other lines.

Now push it as a new commit on my branch: deflangfarsi

https://paste.c-net.org/MinglingDonde

How this change can be merged on upcoming Ubuntu release to solve farsi bug?

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

You cannot merge that change yourself, but you have to find a sponsor who does it for you.
see also https://packaging.ubuntu.com/html/fixing-a-bug.html

Revision history for this message
esmaeelE (esmaeele) said :
#6

OK, I create a patch for ubiquity that add default language Farsi for IRAN.
Is it correct way?

https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1891270/comments/21

Revision history for this message
Manfred Hampl (m-hampl) said (last edit ):
#7

I do not understand why the debdiff is so long.
It seems that it contains more than just the change for the Iranian calendar settings.
Where does that come from?

Revision history for this message
esmaeelE (esmaeele) said (last edit ):
#8

To patch the ubiquity package I ask question in #ubuntu irc channel they guide me to use these steps.

pull-lp-source ubiquity
cd ubiquity-22.10.1/
quilt new fa_ir.diff
quilt add d-i/patches/localechooser-post-base-installer.patch

vim d-i/patches/localechooser-post-base-installer.patch
and add this line to file
+ IR) deflang=fa ;;

then run `quilt refresh`

add these lines to `debian/changelog`
ubiquity (22.10.2) kinetic; urgency=medium

  * Add default farsi language for IRAN.

 -- EsmaeelE <email address hidden> Wed, 04 May 2022 07:07:53 +0430

ubiquity (22.10.1) kinetic; urgency=medium

  * Update for kinetic.

and build with `debuild -S -d `

generate debdiff with

`debdiff ubiquity_22.10.1.dsc ubiquity_22.10.2.dsc > ubiquity_22.10.2.debdiff`

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

Meanwhile a ubiquity version 22.10.2 with a change different from yours (correction of a typo error) has been published for kinetic.

You have to re-create your debdiff on the base of that new version and give it a new version number. Then attach it to the bug report again.

Revision history for this message
esmaeelE (esmaeele) said :
#10

Thank you. I re-create the debdiff and place on bug page.

https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1891270/comments/24

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

Again I do not understand why the debdiff contains so much more than just a single addition of "++ IR) deflang=fa ;;" and the related changelog entry. It seems to me that you are starting from a different point than what's expected.

But I am no expert in creating patches for serving in package updates.

Revision history for this message
esmaeelE (esmaeele) said :
#12

OK, I work on a wrong file. Actually I patch a patch file.

I change original file `ubiquity-22.10.2/scripts/localechooser-apply`

here is the patch: https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1891270/comments/25

Revision history for this message
Manfred Hampl (m-hampl) said :
#13

That looks much more like the expected result, but there are still some .pc/* files that might be redundant.

I see a reference to fa_ir.diff in /patches/series, but do not see a file with that name anywhere.
I guess that is a wrong leftover.

Revision history for this message
esmaeelE (esmaeele) said :
#14

After many try and fail I don't know how to create this simple patch for ubiquity.

inside scripts/localechooser we have

`# This code is currently duplicated between here and
# ubiquity/d-i/patches/localechooser-post-base-installer.patch. Please keep
# them in sync until the duplication can be removed.
`
I find that to change list of default language these two files must change in patch.

* `scripts/localechooser`
* `d-i/patches/localechooser-post-base-installer.patch`

But generated `debdiff` still have extra changes.

Revision history for this message
esmaeelE (esmaeele) said :
#15

I want to add just one line like this to ubiquity

https://git.launchpad.net/ubiquity/commit/?id=6423d4b8

It seems Gunnar Hjalmarsson and others use git to work with code but I use `pull-lp-source ubiquity`

`diff --git a/debian/changelog b/debian/changelog`

Could you please guide me how to use git in order to clone change and release patch for ubiquity.

I think my way is wrong.

Can you help with this problem?

Provide an answer of your own, or ask esmaeelE for more information if necessary.

To post a message you must log in.