Andy Whitcroft [Thu, 12 May 2016 16:32:22 +0000 (17:32 +0100)]
UBUNTU: [Debian] disable zfs module checks when cross-compiling
When we cross-compile we have to turn off the inbuilt zfs modules.
When doing this we also need to allow the modules so produced to go
missing in this build while still checking the remainder of the modules.
BugLink: http://bugs.launchpad.net/bugs/1581127 Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
David Leonard [Wed, 30 Mar 2016 01:38:21 +0000 (11:38 +1000)]
UBUNTU: [Debian] fix linux_tools when cross-compiling
Fixed invocation of dh_shlibdeps when cross-compiling with
do_linux_tools=true.
Without being told where to find the crossdev libs, dh_shlibdeps
will emit these warnings and fail the linux-tools package:
Debug: binary-acm7xxx
...
dh_shlibdeps -plinux-headers-4.4.0-15-generic
arm-linux-gnueabihf-objdump: .../asn1_compiler: File format not recognized
arm-linux-gnueabihf-objdump: .../extract-cert: File format not recognized
...
1) we should not be separating the prefix and instance numbers with an '_',
2) IPADDR/NETMASK instance 0 does have a suffix which we do not provide,
3) GATEWAY instance 0 is inconsistant,
4) IPv6 should be configured whether IPv4 is DHCP or not, and
5) DHCP mode is selected via BOOTPROTO=dhcp not DHCP=yes.
Andy Whitcroft [Thu, 28 Jan 2016 12:03:00 +0000 (12:03 +0000)]
UBUNTU: [Debian] hv: hv_set_ifconfig -- convert to python3
From 15.10 onwards python2 is no longer the default python and is no longer
installed by default. Switch to python3 which is. This delta is much
larger than the nominal changes as inconsistent spacing is now an error.
I have also corrected the use of loose strings as comments.
Tim Gardner [Tue, 6 Oct 2015 16:07:03 +0000 (10:07 -0600)]
UBUNTU: [Debian] config-check and prepare using ${DEBIAN}/config/annotations
Annotations are unique to the derivative. Therefore, use annotations
found in the derivative config directory.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
(cherry picked from commit 4f92f80963c358c9716e70d912449a7c2a5808aa) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Andy Whitcroft [Wed, 23 Sep 2015 10:54:24 +0000 (11:54 +0100)]
UBUNTU: [Debian] rebuild should only trigger for non-linux packages
BugLink: http://bugs.launchpad.net/bugs/1498862 Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Andy Whitcroft [Thu, 3 Sep 2015 21:44:08 +0000 (22:44 +0100)]
UBUNTU: [Debian] control -- prepare for new kernel-wedge semantics
We have been carrying a nastly little patch for kernel-wedge to cope with
the fact we use control.stub. But it is simpler to just go with the flow
and emit the stub by hand. Do this in such a way we keep a fake
debian/control.stub such that we will work with either Debian or Ubuntu
kernel-wedge.
Andy Whitcroft [Thu, 2 Apr 2015 14:51:04 +0000 (15:51 +0100)]
UBUNTU: [Debian] do_common_tools should always be on
do_common_tools is a mode specifier, it is on when we want tools and off
when we do not want tools. It is intended to be flipped by the bootstrap
modes. Whether those common tools are actually built is determined by
whether we are calling binary or binary-arch not related to whether we
want those packages to have content.
Enable this unconditionally. This allows us to build the indep packages
on any arch is needed.
Andy Whitcroft [Wed, 21 Jan 2015 12:52:13 +0000 (12:52 +0000)]
UBUNTU: [Debian] hyper-v -- fix comment handing in /etc/network/interfaces
We are duplicating the opening comment marker every time we rebuild the
file, such that we end up with multiple of those comments:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
# The following stanza(s) added by hv_set_ifconfig
# The following stanza(s) added by hv_set_ifconfig
# The following stanza(s) added by hv_set_ifconfig
auto eth0
iface eth0 inet static
address 10.100.20.108
gateway 10.100.20.1
dns-nameservers 8.8.4.4
#End of hv_set_ifconfig stanzas
Fix handling of these such that we only insert new markers if they do
not already exist. Where they do, simply inject the new stanzas at the
end of the block before the end marker. At the same time deduplicate
sequential begin and end markers to clean up previously dammaged files.
Andy Whitcroft [Tue, 6 Jan 2015 11:05:22 +0000 (11:05 +0000)]
UBUNTU: [Debian] uploadnum should be the remainder of the version
The uploadnum variable in debian/rules is somewhat confusingly named,
it should be the "remainder of the version after <version>-<abinum>", not
just the uploadnum itself. This version is only used for identification
in uname -v and there it is completely appropriate for this to be complete
with backport versions etc.
Andy Whitcroft [Fri, 3 Oct 2014 16:43:13 +0000 (17:43 +0100)]
UBUNTU: [Debian] linux-image-extra postrm is not needed on purge
Signed-off-by: Andy Whitcroft <apw@canonical.com>
(cherry picked from commit 920e8acdb5b860086618e436f572717b631e65ec) Signed-off-by: Andy Whitcroft <apw@canonical.com>
Andy Whitcroft [Thu, 2 Oct 2014 10:00:45 +0000 (11:00 +0100)]
UBUNTU: [Debian] linux-image-extra is additive to linux-image
linux-image-extra is special, it is only additive to linux-image, this
means really cannot use the standard kernel postinst/postrm for this
package. As it also depends on linux-image we know that linux-image will
have been installed before it, and will be removed after it. On change
(installation/update/removal) of linux-image-extra we want to run the
kernel postinst to rebuilt the initramfs and update the bootloader
as necessary. To this end switch to package specific postinst/postrm
which trigger the /etc/kernel/postinst.d hooks. We need to do it this
way to get the specially parameterised incantations of update-initramfs,
to ensure we trigger the correct build rather than mearly dpkg triggering
a rebuild of the running kernel.
dann frazier [Wed, 30 Jul 2014 16:57:11 +0000 (10:57 -0600)]
UBUNTU: [Debian] Fix 'printchanges' to work with versions containing '+'
I maintain several topic kernel branches/builds where I like to use version
strings that contain a '+' character. Today this means I can't use targets
like printchanges and insertchanges because '+' characters aren't escaped.
Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Andy Whitcroft [Wed, 5 Nov 2014 10:28:29 +0000 (10:28 +0000)]
UBUNTU: [Debian] basic hook support
Add the infrastructure for Makefile macro overrides. This
is primarily used by LTS backport branches to supersede master
branch settings such as do_tools_common, etc.
Tim Gardner [Mon, 27 Oct 2014 20:14:08 +0000 (14:14 -0600)]
UBUNTU: [Debian] Fix linux-doc dangling symlinks
BugLink: https://bugs.launchpad.net/bugs/661306 Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: Chris J Arges <chris.j.arges@canonical.com>
Tim Gardner [Fri, 26 Sep 2014 19:30:28 +0000 (13:30 -0600)]
UBUNTU: [Debian] Don't fail if a symlink already exists
A restarted build (dpkg-buildpackage -nc) currently fails if the linux-tools
symlinks remain from a previous build. Use ln -sf to allow the build to
continue by overwriting any existing links.
Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
dann frazier [Fri, 15 Aug 2014 19:40:08 +0000 (13:40 -0600)]
UBUNTU: [debian] Fix regression with ABI subversions and backport
Tim pointed out that 443b5814ee77f8c9083079ce0e6a0806e087630f broke the parsing
of backport versions, such as 8.13~14.10+ppa.1. This should fix it. I used the
following script to validate the regular expressions:
dannf@fluid:~$ cat test.sh
set -e
splitver() {
local ver="$1"
local abinum="$(echo $ver | sed -r -e 's/([^\+~]*)\.[^\.]+(~.*)?(\+.*)?$/\1/')"
local uploadnum="$(echo $ver | sed -r -e 's/[^\+~]*\.([^\.~]+)(~.*)?(\+.*)?$/\1/')"
echo "$abinum $uploadnum"
}
do_test() {
local ver="$1"
local expected="$2"
local actual="$(splitver $ver)"
if [ "$actual" = "$expected" ]; then
echo "PASS: $ver"
return 0
fi
echo "FAIL: $ver split as $actual"
return 1
}
dann frazier [Mon, 11 Aug 2014 19:50:02 +0000 (13:50 -0600)]
UBUNTU: [debian] Allow for package revisions condusive for branching
TLDR; This changes the way that version strings are parsed in the packaging to
make it easier for me to maintain topic branches/PPA builds. There should
be no changes to how things work today for standard Ubuntu kernels. But,
it allows for topic-branch maintainers to add an optional ".X" in the ABI
name, for reasons described below.
<Regression Testing>
------------------
Old Parsing:
= abinum =
$ echo "33.58" | sed -e 's/\..*//'
33
= uploadnum =
$ echo "33.58" | sed -e 's/.*\.//'
58
= abi =
$ echo "33.58" | gawk -F. '{print $1}'
33
New Parsing:
= abinum =
$ echo "33.58" | sed -r -e 's/([^\+]*)\.[^\.]+(\+.*)?$/\1/'
33
= uploadnum =
$ echo "33.58" | sed -r -e 's/[^\+]*\.([^\.]+(\+.*)?$$)/\1/'
58
= abi =
$ echo "33.58" | sed -r -e 's/([^\+]*)\.[^\.]+(\+.*)?$/\1/'
33
</Regression Testing>
When maintaining topic customizations that track Ubuntu kernel releases, it
is nice have the following features:
1) Ability to decipher the base Ubuntu kernel revision used from the topic
kernel's revision number
2) Use a version that dpkg sorts > the base Ubuntu version
3) Use a version that dpkg sorts < the next expected Ubuntu version
4) Ability to retains the same ABI as the base Ubuntu version when the
ABI has indeed not changed. This helps with e.g. d-i compatibility.
5) Make use of ABI tracking facilities (vs. just disabling them)
This is difficult to do with the current version scheme, which encodes the
ABI number in the version string:
<upstream-version>-<abi>.<rev>
I can tack a "+topic.<N>" to the end of rev, we can solve 1-3, but only as
long as as the ABI is the same. Once the ABI changes, I don't have a good way
to bump it. If I increment the ABI, we'll overlap with the next Ubuntu ABI
(breaking #4). If we jump to a huge ABI number (e.g. x100 to go from 32 to
3200), we'll have a package revision that will never again upgrade to an Ubuntu
version (breaking #3), and never get back to the Ubuntu ABI (again breaking #4).
I can of course use a linux-meta package to e.g. transition from a 3200 ABI back
to a 32 ABI at the packaging level, but the bootloader will still consider
3200 to be newer and therefore the default.
I've therefore started using the following scheme:
Andy Whitcroft [Thu, 5 Dec 2013 18:14:04 +0000 (18:14 +0000)]
UBUNTU: [Debian] Improve tools version message
BugLink: http://bugs.launchpad.net/bugs/1257715 Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Tim Gardner [Tue, 26 Nov 2013 17:35:47 +0000 (10:35 -0700)]
UBUNTU: [Debian] Re-sign modules after debug objcopy
BugLink: http://bugs.launchpad.net/bugs/1253155
Adding a GNU debug link to a module ELF destroys the
module signature, so re-sign the module file after the objcopy.
When the symlinks are made we attempt to use relative links if that
would work. However this relies on the file we are making the link to to
actually exist. When it does not we fall back to absolute. This impacts
the initrd links which are made before we make the initrd itself.
When the caller has asked us to use a specific handle file and that file
does not yet exist, see if there are any other files we can use in that
directory. In the common case this will be a version specific file and
highly unique.