On Tue, 2015-11-10 at 10:42 +0100, Yves-Alexis Perez wrote:
> On sam., 2015-11-07 at 14:54 +0000, Ben Hutchings wrote:
> > I've given this a quick review and found a few issues:
>
> Thanks!
> >
> > 1. linux-grsec-{source,support} are included in debian/control but not
> > built by debian/rules.real. I think these should be built; the latter
> > will be needed to build metapackages as in linux-latest.
>
> Done. Right now the package name is hardcoded in debian/rules.real, I'll see
> if there's a way to get it from the configuration somehow (after I get more
> info from the #3 and #4 replies).
This seems to work:
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -13,6 +13,7 @@ DEB_HOST_MULTIARCH:= $(shell dpkg-architecture -a'$(ARCH)'
-qDEB_HOST_MULTIARCH)
DEB_BUILD_ARCH := $(shell dpkg-architecture -a'$(ARCH)' -qDEB_BUILD_ARCH)
endif
MAINTAINER := $(shell sed -ne 's,^Maintainer: .[^<]*<\([^>]*\)>,\1,p'
debian/control)
+SOURCE_PACKAGE_NAME := $(shell dpkg-parsechangelog -SSource)
DISTRIBUTION := $(shell dpkg-parsechangelog -SDistribution)
SOURCE_DATE := $(shell dpkg-parsechangelog -SDate)
SOURCE_DATE_UTC_ISO := $(shell date -u -d '$(SOURCE_DATE)' +%Y-%m-%d)
@@ -191,7 +192,7 @@ install-dummy:
dh_prep
+$(MAKE_SELF) install-base
-install-doc: PACKAGE_NAME = linux-doc-$(VERSION)
+install-doc: PACKAGE_NAME = $(SOURCE_PACKAGE_NAME)-doc-$(VERSION)
install-doc: DIR = $(BUILD_DIR)/build-doc
install-doc: PACKAGE_DIR = debian/$(PACKAGE_NAME)
install-doc: OUT_DIR = $(PACKAGE_DIR)/usr/share/doc/$(PACKAGE_NAME)
@@ -210,7 +211,7 @@ install-doc: $(STAMPS_DIR)/build-doc
gzip -9nqfr $(OUT_DIR)/Documentation
+$(MAKE_SELF) install-base
-install-manual: PACKAGE_NAME = linux-manual-$(VERSION)
+install-manual: PACKAGE_NAME = $(SOURCE_PACKAGE_NAME)-manual-$(VERSION)
install-manual: DIR=$(BUILD_DIR)/build-doc
install-manual: DH_OPTIONS = -p$(PACKAGE_NAME)
install-manual: $(STAMPS_DIR)/build-doc
@@ -329,7 +330,7 @@ install-libc-dev_$(ARCH):
+$(MAKE_SELF) install-base
-install-support: PACKAGE_NAME = linux-support-$(ABINAME)
+install-support: PACKAGE_NAME = $(SOURCE_PACKAGE_NAME)-support-$(ABINAME)
install-support: DH_OPTIONS = -p$(PACKAGE_NAME)
install-support: PACKAGE_DIR = debian/$(PACKAGE_NAME)
install-support: PACKAGE_ROOT = /usr/share/$(PACKAGE_NAME)
@@ -440,7 +441,7 @@ install-udeb_$(ARCH):
dh_gencontrol
dh_builddeb
-install-source: PACKAGE_NAME = linux-source-$(VERSION)
+install-source: PACKAGE_NAME = $(SOURCE_PACKAGE_NAME)-source-$(VERSION)
install-source: DH_OPTIONS = -p$(PACKAGE_NAME)
install-source: $(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.xz $(foreach
FEATURESET,$(filter-out
none,$(ALL_FEATURESETS)),$(BUILD_DIR)/linux-patch-$(UPSTREAMVERSION)-$(FEATURESET).patch.xz)
dh_testdir
--- a/debian/templates/control.main.in
+++ b/debian/templates/control.main.in
@@ -1,4 +1,4 @@
-Package: linux-source-@version@
+Package: @source_package@-source-@version@
Build-Profiles: <!stage1>
Architecture: all
Section: kernel
@@ -13,7 +13,7 @@ Description: Linux kernel source for version @version@ with
Debian patches
features that have already been (or are believed to be) accepted by the
upstream maintainers.
-Package: linux-doc-@version@
+Package: @source_package@-doc-@version@
Build-Profiles: <!stage1>
Architecture: all
Depends: ${misc:Depends}
@@ -27,7 +27,7 @@ Description: Linux kernel specific documentation for version
@version@
/usr/share/doc/linux-doc-@version@/Documentation/00-INDEX
for the detailed description of the contents.
-Package: linux-manual-@version@
+Package: @source_package@-manual-@version@
Build-Profiles: <!stage1>
Architecture: all
Depends: ${misc:Depends}
@@ -46,7 +46,7 @@ Description: Linux kernel API manual pages for version
@version@
may be installed at a time. The linux-doc package containing the
documentation in other formats is free from such restriction.
-Package: linux-support-@abiname@
+Package: @source_package@-support-@abiname@
Build-Profiles: <!stage1>
Architecture: all
Section: devel
--- END ---
[...]
> > 3. The changes to gencontrol.py and rules.real to disable most arch:all
> > packages should depend on configuration, not the source package name.
> > They would then be acceptable for inclusion on the master branch.
>
> By “configuration”, I guess you mean stuff in debian/config/featureset-
> grsec/defines? Unfortunately some of the stuff I touch in gencontrol.py and
> rules.real is not run when featureset is defined, but is more generic than
> that.
>
> Or do you mean I would then modify debian/config/defines (and not the one
> under the featureset-grsec folder) in src;linux-grsec?
You would modify debian/config/defines.
> > 4. There's no need to remove the templates for packages you don't
> > build. However, if you leave them in place, you'll need to override
> > do_extra() in gencontrol.py to omit the extra packages dependent on the
> > configuration (as for (3)).
>
> Ok, I'll check that. Again, what do you envision as configuration: a “source
> package name” in debian/config/defines? Or even a boolean “grsec”? Or more
> generic than that, a “build_extra” boolean?
[...]
Setting the source package name would be redundant. It should be a
generic boolean instead. Please don't use 'build_extra' as that could
be confused as being connected to debian/templates/control.extra.in.
Ben.
--
Ben Hutchings
All the simple programs have been written, and all the good names taken.
signature.asc
Description: This is a digitally signed message part

