Commit ce61f777 authored by Manoj Srivastava's avatar Manoj Srivastava

Remove special case code for official kernels

For the longest tine (well,  ever since Herbert Xu too over building
kernel images from me), kernel-package has carried specal case code for
official images. This has caused some problems, recently, since the need
to preserve ./debian has caused no end of problems when the version
changed out from under ./debian, or when people wanted to edit a file and
expected kernel-package to do a minimal recompile.

However, sometime in the Etch release cycle, the kernel team deprecated
kernel-package as the means of building official kernels, and therefore,
a full release cycle later, we can get rid of the special case rules used
for official packages. Also, this allows us to drop ./debian at teh drop
of a hart, and recreate it with an version that reflects the current
state of the kernel sources. If people want to dump files into ./debian,
we can come up with a different scheme to allow that, if such need can be
demonstrated.
Signed-Off-By: Manoj Srivastava's avatarManoj Srivastava <srivasta@debian.org>
parent 123d4875
......@@ -163,11 +163,11 @@ VFS: Cannot open root device "308" or 03:08
The cause for this is either you have not compiled the file
system type of the root file system into the kernel, or you
have instructed your boot loader to expect an initrd kernel
(this is required for running a recent official kernel image
package from Debian), and have installed a non-initrd garden
variety kernel image. You need to go back and recompile the
kernel image, either including the root file system type as a
builtin, or adding a --initrd flag to the make-kpkg run.
(this is required for running a recent official kernel image,
and have installed a non-initrd garden variety kernel image.
You need to go back and recompile the kernel image, either
including the root file system type as a builtin, or adding a
--initrd flag to the make-kpkg run.
p) Even when the kernel is built with a regular user using fakeroot,
it fails with
> install -p -d -o root -g root -m 755 debian/tmp-image/DEBIAN
......
......@@ -59,8 +59,7 @@ kernel packages.
This information will be used to sign the new packages produced. If
you never intend to sign the kernel images, source, or header packages
created (You should only need to do so if you upload an official
package), you may safely leave it blank. However, we recommend that
created, you may safely leave it blank. However, we recommend that
you do supply a full name if only so that the dpkg -s kernel-*
information looks prettier <grin>.
......
......@@ -5,8 +5,7 @@
# really know what you are doing here if you do that, though)
# Please change the maintainer information, as well as the Debian version
# below, (and maybe the priority as well, especially if you are uploading
# an official package)
# below
# The maintainer information.
maintainer := Unknown Kernel Package Maintainer
......
......@@ -49,7 +49,6 @@ my $ignore_depmod_err = ''; # normally we do not
my $relink_src_link = 'YES'; # There is no harm in checking the link
my $relink_build_link = 'YES'; # There is no harm in checking the link
my $force_build_link = ''; # There is no harm in checking the link
my $official_image = "=OF"; # only true for official images
my $arch = "=A"; # should be same as dpkg --print-installation-architecture
my $kernel_arch = "=B";
my $ramdisk = "=MK"; # List of tools to create initial ram fs.
......
......@@ -48,7 +48,6 @@ my $ignore_depmod_err = ''; # normally we do not
my $relink_src_link = 'YES'; # There is no harm in checking the link
my $relink_build_link = 'YES'; # There is no harm in checking the link
my $force_build_link = ''; # There is no harm in checking the link
my $official_image = "=OF"; # only true for official images
my $arch = "=A"; # should be same as dpkg --print-installation-architecture
my $kernel_arch = "=B";
my $ramdisk = "=MK"; # List of tools to create initial ram fs.
......@@ -163,10 +162,6 @@ if ($link_in_boot) {
$image_dest = "$image_dest/";
$image_dest =~ s|/+$|/|o;
# Official powerpc images may silently upgrade
if ($official_image =~ /^\s*YES\s*$/o && $arch =~ m/powerpc/) {
$silent_modules = 'Yes';
}
$ENV{KERNEL_ARCH}=$kernel_arch if $kernel_arch;
# Paranoid check to make sure that the correct value is put in there
......
......@@ -53,7 +53,6 @@ my $ignore_depmod_err = ''; # normally we do not
my $relink_src_link = 'YES'; # There is no harm in checking the link
my $relink_build_link = 'YES'; # There is no harm in checking the link
my $force_build_link = ''; # There is no harm in checking the link
my $official_image = "=OF"; # only true for official images
my $arch = "=A"; # should be same as dpkg --print-installation-architecture
my $kernel_arch = "=B";
my $ramdisk = "=MK"; # List of tools to create initial ram fs.
......@@ -1206,9 +1205,6 @@ LOADER: {
last if $loader =~ /nettrom/i; # NETTROM does not have to be executed.
last if $loader =~ /arcboot/i; # ARCBOOT does not have to be executed.
last if $loader =~ /delo/i; # DELO does not have to be executed.
if ($official_image =~ /^\s*YES\s*$/o) {
last if $loader =~ /quik/i; # maintainer asked quik invocation to be ignored
}
last unless $loaderloc;
last unless -x $loaderloc;
......
......@@ -61,7 +61,6 @@ my $minimal_swap = ''; # Do not swap symlinks
my $ignore_depmod_err = ''; # normally we do not
my $relink_build_link = 'YES'; # There is no harm in checking the link
my $force_build_link = ''; # we shall not create a dangling link
my $official_image = "=OF"; # only true for official images
my $arch = "=A"; # should be same as dpkg --print-installation-architecture
my $kernel_arch = "=B";
my $ramdisk = "=MK"; # List of tools to create initial ram fs.
......
......@@ -52,7 +52,6 @@ my $ignore_depmod_err = ''; # normally we do not
my $relink_src_link = 'YES'; # There is no harm in checking the link
my $relink_build_link = 'YES'; # There is no harm in checking the link
my $force_build_link = ''; # There is no harm in checking the link
my $official_image = "=OF"; # only true for official images
my $arch = "=A"; # should be same as dpkg --print-installation-architecture
my $kernel_arch = "=B";
my $ramdisk = "=MK"; # List of tools to create initial ram fs.
......@@ -98,11 +97,6 @@ die "Pre inst Internal error. Aborting." unless $version;
exit 0 if $ARGV[0] =~ /abort-upgrade/;
exit 1 unless $ARGV[0] =~ /(install|upgrade)/;
# Official images may silently upgrade
if ($official_image =~ /^\s*YES\s*$/o && ($ARGV[0] =~ /upgrade/)) {
$silent_modules = 'Yes';
}
# remove multiple leading slashes; make sure there is at least one.
$realimageloc =~ s|^/*|/|o;
$realimageloc =~ s|/+|/|o;
......@@ -373,15 +367,6 @@ if (-d "$modules_base/$version") {
warn "Info:\n$errors\n" if $errors;
}
# If this is an official image, and only a build symlink exists, allow
# it to be clobbered.
if ($official_image =~ /^\s*YES\s*$/o ) {
if (-d "$modules_base/$version" && -l "$modules_base/$version/build" ) {
rename("$modules_base/$version/build", "$modules_base/$version/build.save") ||
die "failed to move $modules_base/$version/build:$!";
}
}
if (-d "$modules_base/$version/kernel") {
if ($clobber_modules) {
my $ret =
......
......@@ -47,7 +47,6 @@ my $minimal_swap = ''; # Do not swap symlinks
my $ignore_depmod_err = ''; # normally we do not
my $relink_build_link = 'YES'; # There is no harm in checking the link
my $force_build_link = ''; # There is no harm in checking the link
my $official_image = "=OF"; # only true for official images
my $arch = "=A"; # should be same as dpkg --print-installation-architecture
my $kernel_arch = "=B";
my $ramdisk = "=MK"; # List of tools to create initial ram fs.
......
......@@ -43,7 +43,6 @@ loader="=L"; # lilo, silo, quik, palo, vmelilo, nettrom, arcboot or delo
image_dir="=D"; # where the image is located
initrd="=I"; # initrd kernel
mkimage="=M"; # command to generate the initrd image
official_image="=OF"; # only true for official images
package_name="kernel-uml-$version";
......
......@@ -43,7 +43,6 @@ loader="=L"; # lilo, silo, quik, palo, vmelilo, nettrom, arcboot or delo
image_dir="=D"; # where the image is located
initrd="=I"; # initrd kernel
mkimage="=M"; # command to generate the initrd image
official_image="=OF"; # only true for official images
package_name="kernel-uml-$version";
......
......@@ -43,7 +43,6 @@ loader="=L"; # lilo, silo, quik, palo, vmelilo, nettrom, arcboot or delo
image_dir="=D"; # where the image is located
initrd="=I"; # initrd kernel
mkimage="=M"; # command to generate the initrd image
official_image="=OF"; # only true for official images
subarch="=SA"; # should be xen0 or xenu
ramdisk='/usr/sbin/mkinitrd' # Tool to create initial ram fs.
realimageloc="/$image_dir/";
......
......@@ -43,7 +43,6 @@ loader="=L"; # lilo, silo, quik, palo, vmelilo, nettrom, arcboot or delo
image_dir="=D"; # where the image is located
initrd="=I"; # initrd kernel
mkimage="=M"; # command to generate the initrd image
official_image="=OF"; # only true for official images
subarch="=SA"; # should be xen0 or xenu
package_name="kernel-$subarch-$version";
......
......@@ -32,14 +32,13 @@
###############################################################################
# The Debian revision
# If there is a changelog file, it overrides. The only exception is
# when there is no stamp-config, and there is no debian/official,
# *AND* there is a DEBIAN_REVISION, in which case the DEBIAN_REVISION
# over rides (since we are going to replace the changelog file soon
# anyway. Else, use the commandline or env var setting. Or else
# default to 10.00.Custom, unless the human has requested that the
# revision is mandatory, in which case we raise an error
# The Debian revision If there is a changelog file, it overrides. The
# only exception is when there is no stamp-config, *AND* there is a
# DEBIAN_REVISION, in which case the DEBIAN_REVISION over rides (since
# we are going to replace the changelog file soon anyway. Else, use
# the commandline or env var setting. Or else default to 10.00.Custom,
# unless the human has requested that the revision is mandatory, in
# which case we raise an error
ifeq ($(strip $(HAS_CHANGELOG)),YES)
debian := $(shell if test -f debian/changelog; then \
......@@ -150,7 +149,7 @@ endif
ifneq ($(strip $(DEBIAN_REVISION)),)
HAS_CHANGELOG := $(shell \
if test -f debian/changelog && ( test -f stamp-debian || test -f debian/official );\
if test -f debian/changelog && ( test -f stamp-debian );\
then echo YES;\
else echo NO; fi; )
else
......@@ -165,12 +164,10 @@ ifeq ($(strip $(HAS_CHANGELOG)),YES)
perl -nle 'print /^$(INT_STEM)-source-(\S+)/; exit 0' \
debian/changelog;\
fi; )
# Warn people about version mismatches, unless they are running an
# "official" version, in which case they can shoot themselves in the
# foot if they so desire
# Warn people about version mismatches
ifneq ($(strip $(saved_version)),)
ifneq ($(strip $(saved_version)),$(strip $(KERNELRELEASE)))
HAVE_VERSION_MISMATCH:=$(shell if test ! -f debian/official;then echo YES; fi; )
HAVE_VERSION_MISMATCH:=YES
endif
endif
endif
......@@ -180,8 +177,7 @@ ifneq ($(strip $(DELETE_BUILD_LINK)),)
delete_build_link := YES
else
ifeq ($(strip $(delete_build_link)),)
delete_build_link := $(shell if test -f debian/official; then echo YES;\
else echo NO; fi; )
delete_build_link := NO
endif
endif
......
......@@ -185,8 +185,6 @@ KERNELRELEASE = $(strip $(call doit,if [ -f include/config/kernel.release ]; the
fi;))
AM_OFFICIAL := $(call doit,if [ -f debian/official ]; then echo YES; fi )
# See if we are being run in the kernel directory
ifeq ($(DEB_HOST_ARCH_OS), linux)
define check_kernel_dir
......
......@@ -214,28 +214,17 @@ debian/control debian/changelog debian/rules debian/stamp/conf/full-changelog:
@test -f $(LIBLOC)/rules || exit 4
@test -d debian/stamp || mkdir debian/stamp
@test -d debian/stamp/conf || mkdir debian/stamp/conf
( test -f debian/official && test -f debian/control) || \
sed -e 's/=V/$(KERNELRELEASE)/g' -e 's/=D/$(debian)/g' \
-e 's/=A/$(DEB_HOST_ARCH)/g' -e 's/=SA/$(INT_SUBARCH)/g' \
-e 's/=L/$(int_loaderdep) /g' -e 's/=I/$(initrddep)/g' \
-e 's/=CV/$(VERSION).$(PATCHLEVEL)/g' \
-e 's/=M/$(maintainer) <$(email)>/g' \
-e 's/=ST/$(INT_STEM)/g' -e 's/=B/$(KERNEL_ARCH)/g' \
$(CONTROL)> debian/control
test -f debian/official || \
sed -e 's/=V/$(KERNELRELEASE)/g' -e 's/=D/$(debian)/g' \
sed -e 's/=V/$(KERNELRELEASE)/g' -e 's/=D/$(debian)/g' \
-e 's/=A/$(DEB_HOST_ARCH)/g' -e 's/=M/$(maintainer) <$(email)>/g' \
-e 's/=ST/$(INT_STEM)/g' -e 's/=B/$(KERNEL_ARCH)/g' \
$(LIBLOC)/changelog > debian/changelog
chmod 0644 debian/control debian/changelog
test -f debian/official || \
for file in $(DEBIAN_FILES); do \
cp -f $(LIBLOC)/$$file ./debian/; \
done
test -f debian/official || \
for dir in $(DEBIAN_DIRS); do \
cp -af $(LIBLOC)/$$dir ./debian/; \
done
for file in $(DEBIAN_FILES); do \
cp -f $(LIBLOC)/$$file ./debian/; \
done
for dir in $(DEBIAN_DIRS); do \
cp -af $(LIBLOC)/$$dir ./debian/; \
done
install -p -m 755 $(LIBLOC)/rules debian/rules
@echo done > debian/stamp/conf/full-changelog
......@@ -368,7 +357,7 @@ else
endif
endif
$(eval $(deb_rule))
test -f stamp-building || test -f debian/official || rm -rf debian
test -f stamp-building || rm -rf debian
rm -f $(FILES_TO_CLEAN) $(STAMPS_TO_CLEAN)
rm -rf $(DIRS_TO_CLEAN)
test ! -f ,,precious || mv -f ,,precious .config
......
......@@ -44,9 +44,6 @@ debian/stamp/install/$(d_package):
echo "This was produced by kernel-package version $(kpkg_version)." > \
$(DOCDIR)/Buildinfo
chmod 0644 $(DOCDIR)/Buildinfo
if test -f debian/official && test -f debian/README.Debian ; then \
$(install_file) debian/README.Debian $(DOCDIR)/README.Debian;\
fi
if test -f README.Debian ; then \
$(install_file) README.Debian $(DOCDIR)/README.Debian.1st;\
fi
......
......@@ -67,10 +67,6 @@ debian/stamp/install/$(h_package):
$(install_file) MAINTAINERS $(DOCDIR)/
$(install_file) REPORTING-BUGS $(DOCDIR)/
$(install_file) README $(DOCDIR)/
if test -f debian/official && test -f debian/README.Debian ; then \
$(install_file) debian/README.Debian $(DOCDIR)/README.Debian; \
$(install_file) README.Debian $(DOCDIR)/README.Debian; \
fi
if test -f README.Debian ; then \
$(install_file) README.Debian $(DOCDIR)/README.Debian.1st;\
fi
......
......@@ -74,9 +74,6 @@ endif
$(DOCDIR)/Buildinfo
chmod 0644 $(DOCDIR)/Buildinfo
$(install_file) debian/buildinfo $(DOCDIR)/buildinfo
if test -f debian/official && test -f debian/README.Debian ; then \
$(install_file) debian/README.Debian $(DOCDIR)/README.Debian ; \
fi
if test -f README.Debian ; then \
$(install_file) README.Debian $(DOCDIR)/README.Debian.1st;\
fi
......
......@@ -67,15 +67,9 @@ endif
(cd $(SRCDIR); rm -f stamp-building $(STAMPS_TO_CLEAN))
(cd $(SRCDIR); \
[ ! -d scripts/cramfs ] || make -C scripts/cramfs distclean ; )
if test -f debian/official && test -f debian/README.Debian ; then \
$(install_file) debian/README.Debian $(SRCDIR)/README.Debian ; \
$(install_file) debian/README.Debian $(DOCDIR)/README.Debian ; \
gzip -9qf $(DOCDIR)/README.Debian; \
else \
sed -e 's/=V/$(KERNELRELEASE)/g' -e 's/=A/$(DEB_HOST_ARCH)/g' \
sed -e 's/=V/$(KERNELRELEASE)/g' -e 's/=A/$(DEB_HOST_ARCH)/g' \
-e 's/=ST/$(INT_STEM)/g' -e 's/=B/$(KERNEL_ARCH)/g' \
$(DEBDIR)/pkg/source/README > $(SRCDIR)/README.Debian ; \
fi
$(DEBDIR)/pkg/source/README > $(SRCDIR)/README.Debian ;
if test -f README.Debian ; then \
$(install_file) README.Debian $(DOCDIR)/README.Debian.1st; \
gzip -9qf $(DOCDIR)/README.Debian.1st; \
......
......@@ -670,17 +670,13 @@ sub main (){
exit 1;
}
# Official image maintainers ask to be allowed to create modified
# configure targets.
if (! -f 'debian/official') {
if ($config_target !~ /^(?:|silentold|old|menu|x|g|rand|def|all(mod|yes|no))(config)?$/) {
print "Config type must be one of {config,silentoldconfig, oldconfig,menuconfig,xconfig,\n";
print " gconfig,randconfig,defconfig,allmodconfigallyesconfig,allnoconfig}.\n";
print "use --help to display command line syntax help.\n";
exit 1;
}
$config_target = 'config' unless $2;
if ($config_target !~ /^(?:|silentold|old|menu|x|g|rand|def|all(mod|yes|no))(config)?$/) {
print "Config type must be one of {config,silentoldconfig, oldconfig,menuconfig,xconfig,\n";
print " gconfig,randconfig,defconfig,allmodconfigallyesconfig,allnoconfig}.\n";
print "use --help to display command line syntax help.\n";
exit 1;
}
$config_target = 'config' unless $2;
if ($ENV{'MAKEFLAGS'} &&
($ENV{'MAKEFLAGS'} =~ /-j/ || $ENV{'MAKEFLAGS'} =~ /--jobs/ )) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment