GNU bug report logs - #75809
Hard-coded version code is unsuitable for automated F-Droid Android package builds

Previous Next

Package: emacs;

Reported by: Peter Oliver <p.d.oliver <at> mavit.org.uk>

Date: Fri, 24 Jan 2025 17:20:02 UTC

Severity: normal

Tags: patch

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75809 in the body.
You can then email your comments to 75809 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to help-debbugs <at> gnu.org:
bug#75809; Package debbugs.gnu.org. (Fri, 24 Jan 2025 17:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Oliver <p.d.oliver <at> mavit.org.uk>:
New bug report received and forwarded. Copy sent to help-debbugs <at> gnu.org. (Fri, 24 Jan 2025 17:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peter Oliver <p.d.oliver <at> mavit.org.uk>
To: bug-gnu-emacs <at> debbugs.gnu.org
Cc: Po Lu <luangruo <at> yahoo.com>
Subject: Hard-coded version code is unsuitable for automated F-Droid Android
 package builds
Date: Fri, 24 Jan 2025 17:13:10 +0000 (GMT)
[Message part 1 (text/plain, inline)]
On Sun, 19 Jan 2025, Peter Oliver wrote:

> I notice that F-Droid is able to automatically build packages when a new Git 
> tag is made.  However, in order to do that, it needs to be given an integer 
> version number (called a version code; 
> https://developer.android.com/studio/publish/versioning#versioningsettings). 
> It can look for that either in the name of a Git tag, by searching in a file 
> within Git, or by fetching some data over HTTP 
> (https://f-droid.org/en/docs/Build_Metadata_Reference/#UpdateCheckData).
>
> Currently, this is hard-coded to 30 in java/AndroidManifest.xml.in, but 
> something like 300093000 would be needed (for 30.0.93).  Could we set that 
> for them?

Attached are two patches addressing this.

-- 
Peter Oliver
[0001-Note-that-.apk-packages-for-Android-can-be-installed.patch (text/plain, attachment)]
[0002-Set-android-versionCode-as-an-integer-derived-from-t.patch (text/plain, attachment)]

Information forwarded to help-debbugs <at> gnu.org:
bug#75809; Package debbugs.gnu.org. (Mon, 27 Jan 2025 11:14:01 GMT) Full text and rfc822 format available.

Message #8 received at 75809 <at> debbugs.gnu.org (full text, mbox):

From: Peter Oliver <p.d.oliver <at> mavit.org.uk>
To: 75809 <at> debbugs.gnu.org
Subject: Re: Hard-coded version code is unsuitable for automated F-Droid
 Android package builds
Date: Mon, 27 Jan 2025 11:13:12 +0000 (GMT)
[Message part 1 (text/plain, inline)]
Further to the discussion on emacs-devel, here is an updated patch.

-- 
Peter Oliver
[0002-Provide-an-Android-version-code-derived-from-the-Ema.patch (text/plain, attachment)]

Information forwarded to help-debbugs <at> gnu.org:
bug#75809; Package debbugs.gnu.org. (Thu, 20 Feb 2025 15:13:02 GMT) Full text and rfc822 format available.

Message #11 received at 75809 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Peter Oliver <p.d.oliver <at> mavit.org.uk>
Cc: 75809 <at> debbugs.gnu.org
Subject: Re: bug#75809: Hard-coded version code is unsuitable for automated
 F-Droid Android package builds
Date: Thu, 20 Feb 2025 23:12:28 +0800
Peter Oliver <p.d.oliver <at> mavit.org.uk> writes:

> Further to the discussion on emacs-devel, here is an updated patch.

My apologies for having overlooked this for so long.  Is there any
chance the file name could be shorter?  Or even a comment in
java/AndroidManifest.xml-in?




Information forwarded to help-debbugs <at> gnu.org:
bug#75809; Package debbugs.gnu.org. (Thu, 20 Feb 2025 16:33:04 GMT) Full text and rfc822 format available.

Message #14 received at 75809 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Peter Oliver <p.d.oliver <at> mavit.org.uk>, 75809 <at> debbugs.gnu.org
Subject: Re: bug#75809: Hard-coded version code is unsuitable for automated
 F-Droid Android package builds
Date: Thu, 20 Feb 2025 08:32:14 -0800
Po Lu <luangruo <at> yahoo.com> writes:

> Peter Oliver <p.d.oliver <at> mavit.org.uk> writes:
>
>> Further to the discussion on emacs-devel, here is an updated patch.
>
> My apologies for having overlooked this for so long.  Is there any
> chance the file name could be shorter?  Or even a comment in
> java/AndroidManifest.xml-in?

Peter, what are your thought on the above?

If it can't be put in a comment, instead of "incrementing-version-code",
how about "android-version"?




Information forwarded to help-debbugs <at> gnu.org:
bug#75809; Package debbugs.gnu.org. (Tue, 25 Feb 2025 13:13:02 GMT) Full text and rfc822 format available.

Message #17 received at 75809 <at> debbugs.gnu.org (full text, mbox):

From: Peter Oliver <p.d.oliver <at> mavit.org.uk>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, 75809 <at> debbugs.gnu.org
Subject: Re: bug#75809: Hard-coded version code is unsuitable for automated
 F-Droid Android package builds
Date: Tue, 25 Feb 2025 13:12:35 +0000 (GMT)
[Message part 1 (text/plain, inline)]
On Thu, 20 Feb 2025, Stefan Kangas wrote:

> Po Lu <luangruo <at> yahoo.com> writes:
>
>> Peter Oliver <p.d.oliver <at> mavit.org.uk> writes:
>>
>>> Further to the discussion on emacs-devel, here is an updated patch.
>>
>> My apologies for having overlooked this for so long.  Is there any
>> chance the file name could be shorter?  Or even a comment in
>> java/AndroidManifest.xml-in?
>
> Peter, what are your thought on the above?

Anything that can be matched with a regular expression is fine, so a comment would work.  Creating a new file for this purpose seems neater and potentially less fragile to me, but I’m happy to do whatever you think best.

> If it can't be put in a comment, instead of "incrementing-version-code",
> how about "android-version"?

We can call the file whatever we think makes most sense.  We just have to update the patch we send to F-Droid (https://gitlab.com/fdroid/fdroiddata/-/merge_requests/19018/diffs) to contain whatever filename we choose.

-- 
Peter Oliver

bug reassigned from package 'debbugs.gnu.org' to 'emacs'. Request was from Felix Lechner <felix.lechner <at> lease-up.com> to control <at> debbugs.gnu.org. (Thu, 27 Feb 2025 13:30:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75809; Package emacs. (Tue, 04 Mar 2025 02:57:01 GMT) Full text and rfc822 format available.

Message #22 received at 75809 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Peter Oliver <p.d.oliver <at> mavit.org.uk>
Cc: Po Lu <luangruo <at> yahoo.com>, 75809 <at> debbugs.gnu.org
Subject: Re: bug#75809: Hard-coded version code is unsuitable for automated
 F-Droid Android package builds
Date: Tue, 4 Mar 2025 02:56:43 +0000
Peter Oliver <p.d.oliver <at> mavit.org.uk> writes:

> On Thu, 20 Feb 2025, Stefan Kangas wrote:
>
>> Po Lu <luangruo <at> yahoo.com> writes:
>>
>>> Peter Oliver <p.d.oliver <at> mavit.org.uk> writes:
>>>
>>>> Further to the discussion on emacs-devel, here is an updated patch.
>>>
>>> My apologies for having overlooked this for so long.  Is there any
>>> chance the file name could be shorter?  Or even a comment in
>>> java/AndroidManifest.xml-in?
>>
>> Peter, what are your thought on the above?
>
> Anything that can be matched with a regular expression is fine, so a comment
> would work.  Creating a new file for this purpose seems neater and potentially
> less fragile to me, but I’m happy to do whatever you think best.
>
>> If it can't be put in a comment, instead of "incrementing-version-code",
>> how about "android-version"?
>
> We can call the file whatever we think makes most sense.  We just have to update
> the patch we send to F-Droid
> (https://gitlab.com/fdroid/fdroiddata/-/merge_requests/19018/diffs) to contain
> whatever filename we choose.

Po Lu, could you please install Peter's patch amended to use the file
and/or comment that you think is suitable here?  Thanks in advance.




Added tag(s) patch. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 04 Mar 2025 02:58:02 GMT) Full text and rfc822 format available.

Reply sent to Po Lu <luangruo <at> yahoo.com>:
You have taken responsibility. (Wed, 05 Mar 2025 07:01:02 GMT) Full text and rfc822 format available.

Notification sent to Peter Oliver <p.d.oliver <at> mavit.org.uk>:
bug acknowledged by developer. (Wed, 05 Mar 2025 07:01:02 GMT) Full text and rfc822 format available.

Message #29 received at 75809-done <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Peter Oliver <p.d.oliver <at> mavit.org.uk>, 75809-done <at> debbugs.gnu.org
Subject: Re: bug#75809: Hard-coded version code is unsuitable for automated
 F-Droid Android package builds
Date: Wed, 05 Mar 2025 14:59:58 +0800
Stefan Kangas <stefankangas <at> gmail.com> writes:

> Peter Oliver <p.d.oliver <at> mavit.org.uk> writes:
>
>> On Thu, 20 Feb 2025, Stefan Kangas wrote:
>>
>>> Po Lu <luangruo <at> yahoo.com> writes:
>>>
>>>> Peter Oliver <p.d.oliver <at> mavit.org.uk> writes:
>>>>
>>>>> Further to the discussion on emacs-devel, here is an updated patch.
>>>>
>>>> My apologies for having overlooked this for so long.  Is there any
>>>> chance the file name could be shorter?  Or even a comment in
>>>> java/AndroidManifest.xml-in?
>>>
>>> Peter, what are your thought on the above?
>>
>> Anything that can be matched with a regular expression is fine, so a comment
>> would work.  Creating a new file for this purpose seems neater and potentially
>> less fragile to me, but I’m happy to do whatever you think best.
>>
>>> If it can't be put in a comment, instead of "incrementing-version-code",
>>> how about "android-version"?
>>
>> We can call the file whatever we think makes most sense.  We just have to update
>> the patch we send to F-Droid
>> (https://gitlab.com/fdroid/fdroiddata/-/merge_requests/19018/diffs) to contain
>> whatever filename we choose.
>
> Po Lu, could you please install Peter's patch amended to use the file
> and/or comment that you think is suitable here?  Thanks in advance.

Now done.

Closing, and please notify the F-Droid packagers of the fact.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 02 Apr 2025 11:24:15 GMT) Full text and rfc822 format available.

This bug report was last modified 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.