[Pkg-libvirt-commits] [Git][libvirt-team/libvirt][debian/latest] 10 commits: templates: Drop unnecessary uses of [linux-any]

Andrea Bolognani (@abologna) gitlab at salsa.debian.org
Sun Mar 17 21:51:57 GMT 2024



Andrea Bolognani pushed to branch debian/latest at Libvirt Packaging Team / libvirt


Commits:
345e3ca4 by Andrea Bolognani at 2024-03-01T02:42:49+01:00
templates: Drop unnecessary uses of [linux-any]

libvirt-daemon and libvirt-daemon-system are only built on
Linux, so making these lines conditional is unnecessary.

Gbp-Dch: Ignore

- - - - -
2d2fd1ae by Andrea Bolognani at 2024-03-01T02:42:53+01:00
templates: Move from debian/templates/ to debian/

Turns out that years of habit when it comes to editing files
in the debian/ directory are hard to undo :)

Keep the templates in the same directory as everything else.

For *.install, the output files are only generated at build
time so there is no ambiguity and you hardly even notice the
difference compared to before.

For control, the two files being side by side is still not a
big problem, because the suffix can be used to tell the
template apart, and I've noticed that getting used to editing
that one instead of the output file took hardly any time.

Gbp-Dch: Ignore

- - - - -
1a3a1f61 by Andrea Bolognani at 2024-03-01T02:43:46+01:00
install: Turn all into templates

This makes for a more consistent experience when editing
them, and avoids the churn that would happen in the future
if architecture-dependent files were moved between package,
or were added to packages that didn't have any until then.

The script that processes these templates is fairly fast, so
processing a dozen more doesn't cause a noticeable increase
in build time.

Gbp-Dch: Ignore

- - - - -
73d94b57 by Andrea Bolognani at 2024-03-06T23:20:42+01:00
scripts: Use better name for variable

It's not used for generic "variables", but to store
architectures. Name it accordingly.

Gbp-Dch: Ignore

- - - - -
f5d3d2c6 by Andrea Bolognani at 2024-03-06T23:22:19+01:00
scripts: Use pathlib more

Instead of performing string manipulation, use pathlib for
semantic access to the various parts of each path.

Gbp-Dch: Ignore

- - - - -
03fb4b42 by Andrea Bolognani at 2024-03-06T23:23:24+01:00
scripts: Sort templates before processing them

It just makes for nicer output.

Gbp-Dch: Ignore

- - - - -
806dea63 by Andrea Bolognani at 2024-03-06T23:23:57+01:00
scripts: Error out on unknown suffix

Make the script robust against random packaging files being
turned into templates without implementing proper handling
for them first.

Gbp-Dch: Ignored

- - - - -
66afacc5 by Andrea Bolognani at 2024-03-06T23:24:56+01:00
scripts: Make it possible to turn maintscripts into templates

Maintainer scripts are supposed to be completely stand-alone,
so it's not possible to create a "library" of common code.

We still need to perform the same operations in the context of
several binary packages though, so code sharing is still
happening - it just takes the crude form of copy and paste.

Since we are already processing templates at build time,
however, we can extend the existing tooling to work on
maintainer scripts too.

The idea is fairly simple: we can have a single file that
contains various shell snippets, each delimited by specific
markers and assigned a unique name; then, in each maintainer
script, we can inject the snippets that we need, avoiding
duplication.

Gbp-Dch: Ignore

- - - - -
cde6d3e4 by Andrea Bolognani at 2024-03-06T23:34:34+01:00
templates: Turn all maintscripts into templates

No actual change for now, just setting the stage for what's
to come.

Gbp-Dch: Ignore

- - - - -
e99fa4e6 by Andrea Bolognani at 2024-03-06T23:39:33+01:00
templates: Adopt across maintscripts

This massively reduces code duplication and will make it a
lot easier to roll out changes if necessary.

Gbp-Dch: Ignore

- - - - -


30 changed files:

- debian/.gitignore
- debian/README.source
- debian/templates/control.in → debian/control.in
- debian/libnss-libvirt.install → debian/libnss-libvirt.install.in
- debian/libvirt-clients-qemu.install → debian/libvirt-clients-qemu.install.in
- debian/templates/libvirt-clients.install.in → debian/libvirt-clients.install.in
- debian/libvirt-clients.postrm → debian/libvirt-clients.postrm.in
- debian/libvirt-clients.preinst → debian/libvirt-clients.preinst.in
- debian/libvirt-daemon-config-network.install → debian/libvirt-daemon-config-network.install.in
- + debian/libvirt-daemon-config-network.postinst.in
- debian/libvirt-daemon-config-network.postrm → debian/libvirt-daemon-config-network.postrm.in
- debian/libvirt-daemon-config-nwfilter.install → debian/libvirt-daemon-config-nwfilter.install.in
- debian/libvirt-daemon-config-nwfilter.postinst → debian/libvirt-daemon-config-nwfilter.postinst.in
- debian/libvirt-daemon-config-nwfilter.postrm → debian/libvirt-daemon-config-nwfilter.postrm.in
- debian/libvirt-daemon-driver-lxc.install → debian/libvirt-daemon-driver-lxc.install.in
- debian/libvirt-daemon-driver-qemu.install → debian/libvirt-daemon-driver-qemu.install.in
- debian/libvirt-daemon-driver-storage-gluster.install → debian/libvirt-daemon-driver-storage-gluster.install.in
- debian/libvirt-daemon-driver-storage-iscsi-direct.install → debian/libvirt-daemon-driver-storage-iscsi-direct.install.in
- debian/libvirt-daemon-driver-storage-rbd.install → debian/libvirt-daemon-driver-storage-rbd.install.in
- debian/libvirt-daemon-driver-storage-zfs.install → debian/libvirt-daemon-driver-storage-zfs.install.in
- debian/libvirt-daemon-driver-vbox.install → debian/libvirt-daemon-driver-vbox.install.in
- debian/libvirt-daemon-driver-xen.install → debian/libvirt-daemon-driver-xen.install.in
- debian/templates/libvirt-daemon-system.install.in → debian/libvirt-daemon-system.install.in
- debian/libvirt-daemon-system.postinst → debian/libvirt-daemon-system.postinst.in
- debian/libvirt-daemon-system.postrm → debian/libvirt-daemon-system.postrm.in
- debian/libvirt-daemon-system.preinst → debian/libvirt-daemon-system.preinst.in
- debian/templates/libvirt-daemon.install.in → debian/libvirt-daemon.install.in
- debian/libvirt-dev.install → debian/libvirt-dev.install.in
- debian/libvirt-l10n.install → debian/libvirt-l10n.install.in
- debian/libvirt-login-shell.install → debian/libvirt-login-shell.install.in


The diff was not included because it is too large.


View it on GitLab: https://salsa.debian.org/libvirt-team/libvirt/-/compare/9891c49650eb5e8a9e5987800905e1e35dcee08e...e99fa4e6f153f27d81b79b2019073a52aee83a84

-- 
View it on GitLab: https://salsa.debian.org/libvirt-team/libvirt/-/compare/9891c49650eb5e8a9e5987800905e1e35dcee08e...e99fa4e6f153f27d81b79b2019073a52aee83a84
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-commits/attachments/20240317/0242c52c/attachment.htm>


More information about the Pkg-libvirt-commits mailing list