Unknown system type: Linux 6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postfix |
Fix Released
|
Undecided
|
Unassigned | ||
postfix (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Miriam España Acebal | ||
Kinetic |
Fix Released
|
Undecided
|
Miriam España Acebal |
Bug Description
[ Impact ]
Users that upgrade their kernel to version 6.0 and have ad-hoc changes
to postfix package cannot build it.
[ Test Plan ]
First, we prepare a Kinetic VM with availability to load with a kernel upgrade:
#0. Setting the VM
# lxc init --vm ubuntu-
# lxc config set KLINUX6 -c security.
# lxc start KLINUX6
# lxc shell KLINUX6
# apt update && apt upgrade -y
#1.Preps for upgrading kernel and getting tools to build postfix
#1.1. Checking we are in LINUX5
# uname -r # this has to return LINUX5 Kernel (5.15.0-60-generic
)
#1.2. Installing mainline
# add-apt-repository ppa:cappelikan/ppa -y
# apt update
# apt install mainline -y
#1.3 Upgrading kernel
# mainline --check
# mainline --install-latest
# shutdown -r now
#1.4 After rebooting, checking kernel version (6.2.8)
# uname -r
#1.5 installing necessary packages for building postfix
# apt install ubuntu-dev-tools libdb5.3-dev -y
#2. BAD CASE
#2.1. Downloading actual postfix's source code in Kinetic
# pull-lp-source postfix kinetic
# cd postfix-3.6.4
#2.2. Generating Makefile (and see expected error)
# /usr/bin/make -f Makefile.in MAKELEVEL= Makefiles
(echo "# Do not edit -- this file documents how Postfix was built for your machine."; /bin/sh makedefs) >makedefs.tmp
ATTENTION:
ATTENTION: Unknown system type: Linux 6.0.0-060000-
ATTENTION:
make: *** [Makefile.in:34: Makefiles] Error 1
#3.GOOD CASE
#3.1 Getting the source code (assuming it is in -proposed) with the fix submitted here
# mkdir proposed
# cd proposed
# pull-lp-source postfix kinetic --security
# cd postfix-3.6.4
#3.2 Generating Makefile (process finishes OK)
# /usr/bin/make -f Makefile.in MAKELEVEL= Makefiles
(echo "# Do not edit -- this file documents how Postfix was built for your machine."; /bin/sh makedefs) >makedefs.tmp
set +e; if cmp makedefs.tmp conf/makedefs.out; then rm makedefs.tmp; \
else mv makedefs.tmp conf/makedefs.out; fi >/dev/null 2>/dev/null
set -e; for i in src/util src/global src/dns src/tls src/xsasl src/master src/milter src/postfix src/fsstone src/smtpstone src/sendmail src/error src/pickup src/cleanup src/smtpd src/local src/trivial-rewrite src/qmgr src/oqmgr src/smtp src/bounce src/pipe src/showq src/postalias src/postcat src/postconf src/postdrop src/postkick src/postlock src/postlog src/postmap src/postqueue src/postsuper src/qmqpd src/spawn src/flush src/verify rmail src/virtual src/proxymap src/anvil src/scache src/discard src/tlsmgr src/postmulti src/postscreen src/dnsblog src/tlsproxy src/posttls-finger src/postlogd; do \
(set -e; echo "[$i]"; cd $i; rm -f Makefile; \
/usr/bin/make -f Makefile.in Makefile MAKELEVEL=) || exit 1; \
done
[src/util]
cat ../../conf/
[src/global]
cat ../../conf/
[src/dns]
cat ../../conf/
[src/tls]
[...]
[src/postlogd]
cat ../../conf/
[ Where problems could occur ]
This fix is part of a stable microrelase. As indicated in the PostfixUpdates MRE exception "Upstream has tight requirements for what goes into stable microreleases, QAs them with regression tests, and has a good history of not breaking anything", which doesn't imply risk-free.
In particular, the fix submitted here adds portability to the postfix package. It doesn't break Ubuntu CI builds and the danger could come from upgrading the kernel itself (that's a risk on the user side, as it is LINUX5 by default -not LINUX6-).
The autopkgtest tests checked the relationships with the versions of the available dependencies and other package-specific issues which is probably what we should focus on to mitigate possible regression scenarios.
[ Other Info ]
It's true that the default kernel in Jammy and Kinetic is not 6.0, but as the upgrade can be done in a kind of supported way through mainline tool,
it's worth adding this fix for these advanced users.
Also, doing this fix because it was part of the latest stable microrelease in the 3.6 band for postfix, and an MRE with it was correctly rejected due to functional regression due to another fix not related to this.
[ Original Report ]
-------
It is not possible to build Postfix on a Linux 6 system!
Build-Error:
ATTENTION: Unknown system type: Linux 6.0.5-200.
I tried to build a patch but it returns a different error:
/usr/bin/strip: /home/builduser
Patch1:
--- postfix-
+++ postfix-
@@ -627,7 +627,7 @@
: ${SHLIB_
: ${PLUGIN_
;;
- Linux.[345].*) SYSTYPE=
+ Linux.[3456].*) SYSTYPE=
Patch2:
--- postfix-
+++ postfix-
@@ -751,7 +751,7 @@
/*
* LINUX.
*/
-#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5)
+#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5) || defined(LINUX6)
#define SUPPORTED
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
SPEC-File:
Version: 3.7.3
# command 'rpmbuild -bb postfix.spec --with production' will tune for current hardware while default stays 'sandybridge'
%if %{?_with_
%global rpmsuffix native
%global build_native_
%global optflags $(sed "s/sandybridge/
%else
%global rpmsuffix sandybridge
%global build_native_
%endif
%define postfix_uid 89
%define postfix_user postfix
%define postfix_gid 89
%define postfix_group postfix
%define maildrop_group postdrop
%define maildrop_gid 90
%define postfix_config_dir %{_sysconfdir}
%define postfix_daemon_dir %{_libexecdir}
%define postfix_command_dir %{_sbindir}
%define postfix_queue_dir %{_var}
%define postfix_data_dir %{_var}/lib/postfix
%define postfix_doc_dir %{_docdir}
%define postfix_sample_dir %{postfix_
%define postfix_readme_dir %{postfix_
%define pflogsumm_ver 1.1.5
Name: postfix
Summary: Postfix Mail Transport Agent
Release: 1.%{build_
Epoch: 2
Group: System Environment/Daemons
URL: http://
License: IBM
Requires: shadow-utils, systemd-units
Requires(post): shadow-utils, systemd-units
Requires(pre): shadow-utils, systemd-units
Requires(preun): shadow-utils, systemd-units
Requires(postun): shadow-utils, systemd-units
Provides: MTA smtpd smtpdaemon server(smtp)
Source0: ftp://ftp.
Source53: http://
Source101: postfix-pam.conf
Source500: postfix.service
Patch0: postfix-
Patch1: postfix-
BuildRequires: pkgconfig, zlib-devel, mysql-devel, cyrus-sasl-devel, pcre-devel, openssl-devel, systemd-units, libdb-devel, perl-generators, pkgconfig, libicu-devel, libnsl2-devel, gcc, m4
Provides: postfix-
Provides: postfix-pflogsumm = %{epoch}
%description
Postfix is a Mail Transport Agent, supporting SMTP AUTH and TLS
%package manpages
Summary: Postfix manuals
Group: Applications/System
%description manpages
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
gzip -dc %{SOURCE53} | tar xf -
pushd pflogsumm-
popd
for f in README_
iconv -f iso8859-1 -t utf8 -o ${f}{_,} &&
touch -r ${f}{,_} && mv -f ${f}{_,}
done
%build
CCARGS=-fPIC
AUXLIBS=
CCARGS="${CCARGS} -DHAS_PCRE -I%{_includedir
AUXLIBS="${AUXLIBS} -lpcre"
CCARGS="${CCARGS} -DHAS_MYSQL -I%{_includedir
AUXLIBS="${AUXLIBS} -L%{_libdir}/mysql -lmysqlclient -lm"
CCARGS="${CCARGS} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I%{_includedir
AUXLIBS="${AUXLIBS} -L%{_libdir}/sasl2 -lsasl2"
CCARGS="${CCARGS} -DUSE_TLS -I/usr/
AUXLIBS="${AUXLIBS} -lssl -lcrypto"
CCARGS="${CCARGS} -DDEF_CONFIG_
CCARGS="${CCARGS} $(getconf LFS_CFLAGS)"
AUXLIBS="${AUXLIBS} -pie -Wl,-z,relro"
%{__make} %{?_smp_mflags} -f Makefile.init makefiles CCARGS="${CCARGS}" AUXLIBS=
OPT="%{optflags} -Wno-comment"
%{__make} %{?_smp_mflags} CCARGS="${CCARGS}" AUXLIBS=
%install
sh postfix-install -non-interactive install_
daemon_
queue_directory
sendmail_
mail_owner=
sample_
install -c auxiliary/
for i in active bounce corrupt defer deferred flush incoming private saved maildrop public pid saved trace; do
mkdir -p %{buildroot}
done
mkdir -p %{buildroot}
install -m 644 %{SOURCE101} %{buildroot}
mkdir -p %{buildroot}
mkdir -p %{buildroot}
cp -pr examples/
cp -p examples/
mv %{buildroot}
mv %{buildroot}
mv %{buildroot}
rm -f %{buildroot}
find %{buildroot}
find %{buildroot}
#move man folder to the correct folder
mv %{buildroot}
#install plogsumm
install -c -m 644 pflogsumm-
install -c -m 644 pflogsumm-
install -c pflogsumm-
mantools/srctoman - auxiliary/
install -c qshape.1 %{buildroot}
install -c auxiliary/
mkdir -p %{buildroot}
install -m 0644 %{SOURCE500} %{buildroot}
rm -f %{buildroot}
rm -f %{buildroot}
rm -f %{buildroot}
rm -f %{buildroot}
#move files to the correct folder
mv %{buildroot}
mv %{buildroot}
mv %{buildroot}
cat %{buildroot}
%post
/usr/bin/systemctl --system daemon-reload 2> /dev/null > /dev/null
%{_sbindir}/postfix set-permissions upgrade-
command_
manpage_
%{_bindir}/unlink /etc/alternativ
%{_bindir}/unlink /etc/alternativ
%{_bindir}/unlink /etc/alternativ
%{_bindir}/unlink /etc/alternativ
%{_bindir}/unlink /etc/alternativ
%{_bindir}/unlink /etc/alternativ
%{_bindir}/unlink /etc/alternativ
%{_bindir}/unlink /etc/alternativ
%{_bindir}/unlink /etc/alternativ
%{_bindir}/unlink /etc/alternativ
exit 0
%pre
%{_sbindir}
%{_sbindir}
%{_sbindir}
%{_sbindir}/useradd -d %{postfix_
%{postfix_user} 2> /dev/null
exit 0
%preun
if [ "$1" == 0 ]; then
/usr/bin/systemctl --no-reload disable postfix.service 2> /dev/null > /dev/null
/usr/bin/systemctl stop postfix.service 2> /dev/null > /dev/null
fi
exit 0
%files
%defattr(-, root, root)
%attr(0644, root, root) %{_unitdir}
%dir %attr(0755, root, root) %{postfix_
%dir %attr(0755, root, root) %{postfix_
%dir %attr(0755, root, root) %{postfix_
%dir %attr(0755, root, root) %{postfix_
%dir %attr(0700, %{postfix_user}, root) %{postfix_data_dir}
%dir %attr(0700, %{postfix_user}, root) %{postfix_
%dir %attr(0700, %{postfix_user}, root) %{postfix_
%dir %attr(0700, %{postfix_user}, root) %{postfix_
%dir %attr(0700, %{postfix_user}, root) %{postfix_
%dir %attr(0700, %{postfix_user}, root) %{postfix_
%dir %attr(0700, %{postfix_user}, root) %{postfix_
%dir %attr(0700, %{postfix_user}, root) %{postfix_
%dir %attr(0700, %{postfix_user}, root) %{postfix_
%dir %attr(0700, %{postfix_user}, root) %{postfix_
%dir %attr(0700, %{postfix_user}, root) %{postfix_
%dir %attr(0730, %{postfix_user}, %{maildrop_group}) %{postfix_
%dir %attr(0710, %{postfix_user}, %{maildrop_group}) %{postfix_
%dir %attr(0700, %{postfix_user}, root) %{postfix_
%attr(2755, root, %{maildrop_group}) %{postfix_
%attr(2755, root, %{maildrop_group}) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0644, root, root) %config(noreplace) %{postfix_
%attr(0644, root, root) %config(noreplace) %{postfix_
%attr(0644, root, root) %config(noreplace) %{postfix_
%attr(0644, root, root) %config(noreplace) %{postfix_
%attr(0644, root, root) %config(noreplace) %{postfix_
%attr(0644, root, root) %config(noreplace) %{postfix_
%attr(0644, root, root) %config(noreplace) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0644, root, root) %{postfix_
%attr(0644, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0644, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{postfix_
%attr(0755, root, root) %{_bindir}/mailq
%attr(0755, root, root) %{_bindir}
%attr(0755, root, root) %{_bindir}/rmail
%config(noreplace) %{_sysconfdir}
/usr/libexec/
%files manpages
%defattr(-, root, root)
%{postfix_doc_dir}
%attr(0644, root, root) %{_mandir}/man1/*
%attr(0644, root, root) %{_mandir}/man5/*
%attr(0644, root, root) %{_mandir}/man8/*
Related branches
- git-ubuntu bot: Approve
- Bryce Harrington (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 165 lines (+137/-0)4 files modifieddebian/changelog (+13/-0)
debian/patches/1995312-unexpected-eof-fix.patch (+89/-0)
debian/patches/1996524-Linux6-support.patch (+33/-0)
debian/patches/series (+2/-0)
- git-ubuntu bot: Approve
- Bryce Harrington (community): Approve
- Canonical Server Core Reviewers: Pending requested
- Canonical Server Reporter: Pending requested
-
Diff: 165 lines (+137/-0)4 files modifieddebian/changelog (+13/-0)
debian/patches/1995312-unexpected-eof-fix.patch (+89/-0)
debian/patches/1996524-Linux6-support.patch (+33/-0)
debian/patches/series (+2/-0)
Changed in postfix: | |
assignee: | nobody → Miriam España Acebal (mirespace) |
status: | New → In Progress |
assignee: | Miriam España Acebal (mirespace) → nobody |
status: | In Progress → New |
Changed in postfix (Ubuntu Jammy): | |
assignee: | nobody → Miriam España Acebal (mirespace) |
Changed in postfix (Ubuntu Kinetic): | |
assignee: | nobody → Miriam España Acebal (mirespace) |
Changed in postfix (Ubuntu Jammy): | |
status: | New → In Progress |
Changed in postfix (Ubuntu Kinetic): | |
status: | New → In Progress |
description: | updated |
An upload of postfix to kinetic-proposed has been rejected from the upload queue for the following reason: "Contains a known functional regression".