Skip to content

Streamline build-packages-locally article#431

Merged
rkratky merged 8 commits intoubuntu:mainfrom
BAMF0:fr-12580-instructions-on-local-building-of-packages
Apr 8, 2026
Merged

Streamline build-packages-locally article#431
rkratky merged 8 commits intoubuntu:mainfrom
BAMF0:fr-12580-instructions-on-local-building-of-packages

Conversation

@BAMF0
Copy link
Copy Markdown
Contributor

@BAMF0 BAMF0 commented Feb 24, 2026

Description

This pull request will streamline the article "How to build packages locally" by making it propose one recommended and more authoritative way of building packages using sbuild, rather than multiple. It is needed to provide a more up to date and direct instruction set that should allow contributor's to build packages in a more uniform way.


Related issue


Checklist

  • I have read and followed the Ubuntu Project contributing guide
  • My pull request is linked to an existing issue (if applicable)
  • I have tested my changes, and they work as expected

Additional notes (optional)

Configuration files as code blocks do not allow copying hashes ("#"), which is currently a UX bug since the text has to be manually copied instead.

@BAMF0 BAMF0 force-pushed the fr-12580-instructions-on-local-building-of-packages branch 2 times, most recently from b538e8c to ad31d7e Compare February 24, 2026 12:35
This will make the article primarily present how to use sbuild,
rather than suggesting multiple build tools. Instead, other build tools
are linked at the very bottom.

Known bug: copying the configuration file does not include the hashes
in comments.
@BAMF0 BAMF0 force-pushed the fr-12580-instructions-on-local-building-of-packages branch from ad31d7e to 57180c6 Compare February 24, 2026 12:42
@BAMF0
Copy link
Copy Markdown
Contributor Author

BAMF0 commented Feb 24, 2026

Force pushed for typo correction

Copy link
Copy Markdown
Collaborator

@rkratky rkratky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @BAMF0! I wanted to suggest a bit more involved formatting changes, so I submitted my review in the form of a PR against your branch at BAMF0#1

@BAMF0
Copy link
Copy Markdown
Contributor Author

BAMF0 commented Feb 27, 2026

@rkratky Nice, thanks! I appreciate the changes. Let me have a look.

Main changes:

    Removed numbers from headings
    Gerunds in sub-headings
    Long options for readability
    More direct/authoritative style
    Some formatting modifications

(Removed hard line breaks, but only because it was easier to edit like that. Otherwise it's not a problem.)
@BAMF0
Copy link
Copy Markdown
Contributor Author

BAMF0 commented Feb 27, 2026

Merged your changes now, the looked good to me.

@jbicha
Copy link
Copy Markdown

jbicha commented Mar 6, 2026

You need to fix #270 if you're going to recommend unshare and ~/.config/sbuild/sbuild.pl` since otherwise the instructions won't work with the current Ubuntu LTS.

See my notes from #295

I don't think enabling experimental tags (-E) is useful for beginners. Lintian already complains about too many things (which is slowly being improved), so we shouldn't add additional warnings that the Lintian maintainers don't recommend and aren't needed even for main inclusion review.

The purge config is unnecessary for unshare, but it is helpful if you're going to use schroot for cross building.

$build_dir = '/home/my_user/schroot/build';
$log_dir = '/home/my_user/schroot/logs';

I don't think this should mention schroot. In my testing, I noticed that the log directory must exist for sbuild to store logs there.

@BAMF0
Copy link
Copy Markdown
Contributor Author

BAMF0 commented Mar 6, 2026

@jbicha Great points! Thanks for the feedback. It's really easy to assume everything from the perspective of the bleeding edge release, however that also risks these incompatibilities you mentioned here.

In this case, I think the way forward is fixing #270 as you suggested, saying in build-packages-locally.rst that the unshare backend requires 25.10 or later (as 25.04 is EOL), and making a note that it can also be used on 24.04 LTS but only if noble-backports is added to the apt sources.

Copy link
Copy Markdown
Collaborator

@mwhudson mwhudson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's a few unsolicited comments! I think the changes mostly go in the right direction but some things are a bit muddled. It probably makes sense to document the new shiny unshare backend and then have a section that says "on older releases set up schroot like a b c"? (I think it's just a touch premature to drop all documentation of the schroot based solution).

@paride
Copy link
Copy Markdown
Collaborator

paride commented Mar 9, 2026

With this ~/.config/sbuild/config.pl I can just sbuild or sbuild -d <release> most of the time, and it just works:

$chroot_mode = 'unshare';
$unshare_mmdebstrap_keep_tarball = 1;

# /tmp is tmpfs and large builds will fail after filling all memory.
$unshare_tmpdir_template = '/var/tmp/tmp.sbuild.XXXXXXXXXX';

$clean_source = 0;
$run_lintian = 0;

Copy link
Copy Markdown
Collaborator

@rkratky rkratky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @BAMF0. A few more suggestions.

@BAMF0
Copy link
Copy Markdown
Contributor Author

BAMF0 commented Apr 8, 2026

Hey folks! In order to get things moving, we are planning to get this merged and move the current unresolved comments into a separate issue in order to keep track of them. I will link the new issue here once it has been created.

@BAMF0
Copy link
Copy Markdown
Contributor Author

BAMF0 commented Apr 8, 2026

Here is the new issue: #536

For ease of use, I have linked the unresolved comments as well in there.

Copy link
Copy Markdown
Collaborator

@rkratky rkratky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@rkratky rkratky merged commit 6a373a3 into ubuntu:main Apr 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Streamline 'local build' instructions

7 participants