BugLink: https://bugs.launchpad.net/bugs/2089411
This currently doesn't work for derivatives because there's a level
of indirection missing and the top-level wrapper is looking in the
wrong place for the .so library.
It should be like this:
foo -> linux-tools/<abi>-<flavor>/foo -> <source>-tools-<abi>/foo
The previous commit took care of the missing indirection. This commit
fixes the wrapper to look in the correct directory for the library.
While at it, run it through black and make the wrapper and the .so
library non-executable.
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Agathe Porte <agathe.porte@canonical.com>
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
(backported from commit e3092e36b13ccf423258b2232cff0c4d5841d426 plucky:linux)
[juergh: Changed $(DEB_SOURCE) -> $(src_pkg_name)]
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Kevin Becker <kevin.becker@canonical.com>
Acked-by: Agathe Porte <agathe.porte@canonical.com>
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2089411
The python perf library needs a symlink from the unflavored to the
flavored package directory, just like any of the other tools binaries.
However, it's somewhat special in that the link target name cannot be
determined easily and reliably (python-version- and host-architecture-
specific). To work around that, link the subdirectory that contains it.
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Kevin Becker <kevin.becker@canonical.com>
Acked-by: Agathe Porte <agathe.porte@canonical.com>
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2050083
armhf does not have working BTF for now, so create an empty header file
like Debian does for now, to be dropped once that issue is fixed.
Follow-up for aefbe1e1a9a1d3ed84bceac7e9739a92e1345f58
Signed-off-by: Luca Boccassi <bluca@debian.org>
[ add do_tools_bpftool_stub to avoid hardcoding the arch in rules ]
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
(cherry-picked from commit 0c32444afa9bd036e66cbc8c05dbd8df8388bc6f oracular:linux)
Signed-off-by: Mehmet Basaran <mehmet.basaran@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2050083
Add a new binary linux-bpf-dev package that ships a generated vmlinux.h
header. This can be used by packages building CO-RE BPF programs instead
of generating it at build time based on the kernel running on the package
build system, which might or might not match the kernel that is actually
shipped. It ensures that a matching header can always be used.
Matches changes in Debian, including the package name and header installation
location, so that we do not have to ifdef:
https://salsa.debian.org/kernel-team/linux/-/commit/f52d006f3915ac4358dc8c98aa417477ebee026e
This is already used by systemd to build various CO-RE programs, and
right now on Ubuntu due to the lack of this package the header is
generated from sysfs in the build system where the systemd packages are
built.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
(cherry-picked from commit 6032cf45d201ec539a8efa493989366bde75fd96 oracular:linux)
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Agathe Porte <agathe.porte@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2051560
The perf python module is required by some tools (e.g., tuned) and we
are not currently providing it.
Enable it to be able to support tools that require this module.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
In commit fd8ee93c3a38 ("UBUNTU: [Packaging] drop useless linux-doc") we
decided to remove the linux-doc package, saving in this way a lot of
space required to produce the documentation content (that can be easily
found online).
However, this change broke some user-space packages that are still
requiring linux-doc as a dependency.
Therefore, re-introduce an empty linux-doc package to prevent the
breakgage and at the same time avoid to re-introduce the expensive build
dependencies.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
[esmil: handle linux-doc like the linux-source package]
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
On Ubuntu, /bin/sh is a symlink to /bin/dash by default.
While this is a rare use case, when /bin/sh is a symlink to /bin/bash,
the annotation check fails due to a mismatch of CONFIG_UBUNTU_ODM_DRIVERS.
debian/scripts/misc/arch-has-odm-enabled.sh always fails with bash.
You can see it if you directly execute it.
[with dash]
$ dash debian/scripts/misc/arch-has-odm-enabled.sh amd64
cat: debian/scripts/misc/../../../debian.master/rules.d/hooks.mk: No such file or directory
$ echo $?
0
[with bash]
$ bash debian/scripts/misc/arch-has-odm-enabled.sh amd64
cat: debian/scripts/misc/../../../debian.master/rules.d/hooks.mk: No such file or directory
debian/scripts/misc/arch-has-odm-enabled.sh: line 26: return: can only `return' from a function or sourced script
$ echo $?
2
Bash provides stricter checks, hence the 'return' statement outside
a function leads to an error.
While it is trivial to fix, I wonder if we need this script in the
first place. Its purpose is to make CONFIG_UBUNTU_ODM_DRIVERS a
user-unconfigurable option.
Given debian.*/config/annotations specifying the CONFIG set for each
arch/flavour, why not handle CONFIG_UBUNTU_ODM_DRIVERS just like
other normal CONFIG options? Users are still allow to toggle it from
menuconfig etc., but I do not see a significant issue, as any trouble
comes to users' responsibility when they change CONFIG options by
themselves.
Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Both Debian kernel and Ubuntu kernel provide a linux-source package,
but a difference is that Debian's one does not include the debian/
directory, while Ubuntu's one includes debian/ and debian.*/ directories.
Including a debian/ directory in a binary package is odd.
If you want to rebuild the kernel in the Ubuntu way, you can get the
source package by 'apt-get source'. It is not what the linux-source
package should offer.
Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
The linux-laptop kernel no longer serves any purpose and is removed in
Noble. The generic kernel now supports the ARM X13s laptop.
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2052439
The linux-source package only makes sense for the main linux kernel.
Building it for derivatives is useless and just confuses users. By
default it is enabled globally in 0-common-vars.mk so make sure it is
turned off afterwards for non-linux source packages.
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2052439
The linux-source-<version> package may only be built for the main linux
source package. Similar to linux-libc-dev, move the packaging stub to
debian/control.d and only include it if the source package name is
indeed 'linux'.
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2048183
The indep tools packages provide symlinks and other generic files and
as such may only be built for the main source package. Ensure that
by turning on the package build only for the main linux source package.
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2048183
The following packages may only be built for the main linux source
package. Similar to linux-libc-dev, move the packaging stubs to
debian/control.d and only include them if the source package name is
indeed 'linux':
- linux-tools-common
- linux-cloud-tools-common
- linux-host-tools
Also change the package names in the rules to linux-* to further make
sure that we don't accidentially build linux-<variant>-* packages should
a derivative's control file contain incorrect package stanzas.
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Remove the update-dkms-versions script from the tree, it's replaced by
'cranky update-dkms-versions', move the dkms-versions file and fix all
references to the old location.
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
This was missed in the below commit, fix it.
Fixes: af3f324f1cb3 ("UBUNTU: [Packaging] Remove do_full_source variable")
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
linux-buildinfo packages are now externally compared by swm, with
results approving or rejecting updates based on the stable
tracker. Those checks also allow hints and overrides to accept
intentional changes.
Also these are done on the correct pair-wise comparisons, especially
when two streams are being cranked.
The above eliminates the need to identify previous build abi,
download, extract it, vendor it in, and assert it at build time.
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Disable riscv64 build for now, since the ABI files are completely
removed every time we start a new kernel release.
Moreover, building riscv64 in generic consistently increase the overall
build time of the packages (3 days or more), slowing down the testing
process of the new published kernels.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1945989
Add a new script responsible for checking if any FIPS relevant commit
was added since the last version. If a new change is found, a
corresponding entry should exist in the justifications file otherwise
the check will fail.
The justifications file is located at "${DEBIAN}/fips.justifications"
and should follow the following format for each commit justification:
<commit short message>
<commit justification>
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
(ported from commit 68d02506ae6b236d7df155cdcaa64456e9153d5e focal)
[magalilemes: added arch/arm64/crypto and lib/crypto/{sha1,aes}.c to
crypto_files; changed the way tag_prefix is set]
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2045562
Debian source format 1.0 cannot remove files, create symlinks and change
permission in the .diff.gz tarball. Therefore any changes in these 3
categories cannot be represented without any tricks. To solve this,
the `reconstruct` script is used every time we build the source package.
The script is generated by `gen-auto-reconstruct` script by the `cranky
close`. It checks if there has been any changes in the 3 categories
mentioned above between the upstream version (i.e v6.5) and the current one.
The problem with the script is that in case a file A was removed since the
upstream version was released, the `reconstruct` script will contains
these commands in this exact order:
rm -f A
chmod -x A
The second command will fail because file A does not exist anymore.
This is solved by generating the `chmod +/-x` commands before `rm`.
Which results in:
chmod -x A
rm -f A
But because the reconstruct script is used during `clean` rule which is
triggered pretty much during every cranky step which is run in the
source repo, the first command will always file because file is not
present anymore in the tree. To solve this, any `chmod` change is added
only if the file has not been deleted. Therefore if file A has been
deleted, the `reconstruct` script will contain only this:
rm -f A
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
Acked-by: Manuel Diewald <manuel.diewald@canonical.com>
Acked-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
The make variables nvidia_desktop_series and nvidia_server_series are no longer
used since [1], so remove them.
[1] fa6c8ea55822 ("UBUNTU: [Debian] remove nvidia dkms build support")
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>