-
Notifications
You must be signed in to change notification settings - Fork 104
backport 6.12 deb package script to 6.6 kernel #1364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
RevySR
wants to merge
32
commits into
deepin-community:linux-6.6.y
Choose a base branch
from
RevySR:deepin/6.6.y/debpack
base: linux-6.6.y
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
605ad88
UPSTREAM: kbuild: deb-pkg: apply short -R and -j options
dmitriib1 3de27d6
UPSTREAM: kbuild: deb-pkg: remove the fakeroot builds support
masahir0y 091abea
UPSTREAM: kbuild: deb-pkg: split debian/copyright from the mkdebian s…
masahir0y e855818
UPSTREAM: kbuild: deb-pkg: hard-code Build-Depends
masahir0y 9120b9b
UPSTREAM: kbuild: deb-pkg: factor out common Make options in debian/r…
masahir0y ee11908
UPSTREAM: kbuild: deb-pkg: squash scripts/package/deb-build-option to…
masahir0y 3aac018
UPSTREAM: kbuild: deb-pkg: set DEB_* variables if debian/rules is dir…
masahir0y b24ef6c
UPSTREAM: kbuild: deb-pkg: allow to run debian/rules from output dire…
masahir0y 24e43a7
UPSTREAM: kbuild: deb-pkg: remove unneeded '-f $srctree/Makefile' in …
masahir0y 21ee9f4
UPSTREAM: kbuild: deb-pkg: use more debhelper commands in builddeb
masahir0y 14d0aa7
UPSTREAM: kbuild: deb-pkg: use build ID instead of debug link for dbg…
masahir0y 6ce3d8c
UPSTREAM: kbuild: deb-pkg: do not search for 'scripts' directory unde…
masahir0y c2cc8e8
UPSTREAM: kbuild: deb-pkg: move 'make headers' to build-arch
masahir0y cd7afe1
UPSTREAM: kbuild: deb-pkg: use debian/<package> for tmpdir
masahir0y 800daf4
UPSTREAM: kbuild: deb-pkg: show verbose log for direct package builds
masahir0y 2613eb1
UPSTREAM: kbuild: deb-pkg: make debian/rules quiet for 'make deb-pkg'
masahir0y efc018c
UPSTREAM: kbuild: deb-pkg: build binary-arch in parallel
masahir0y ae7c7a7
UPSTREAM: kbuild: deb-pkg: call more misc debhelper commands
masahir0y 2a6ebce
BACKPORT: UPSTREAM: kbuild: move init/build-version to scripts/
masahir0y a0103bf
UPSTREAM: kbuild: deb-pkg: remove support for EMAIL environment variable
masahir0y bb1f9d2
UPSTREAM: kbuild: deb-pkg: remove support for "name <email>" form for…
masahir0y e2f778f
BACKPORT: UPSTREAM: kbuild: package: add -e and -u options to some sh…
masahir0y d7109f3
UPSTREAM: kbuild: deb-pkg: use default string when variable is unset …
masahir0y daa5fff
UPSTREAM: kbuild: deb-pkg: Remove blank first line from maint scripts
dev-aaront-org 9727ab5
UPSTREAM: kbuild: slim down package for building external modules
masahir0y 69047d0
UPSTREAM: kbuild: cross-compile linux-headers package when possible
masahir0y 36fee70
UPSTREAM: kbuild: deb-pkg: add pkg.linux-upstream.nokernelheaders bui…
masahir0y 8273636
UPSTREAM: kbuild: deb-pkg: add pkg.linux-upstream.nokerneldbg build p…
masahir0y e9aba05
UPSTREAM: kbuild: deb-pkg: Don't fail if modules.order is missing
mfleming 3af452f
UPSTREAM: kbuild: deb-pkg: add python3:native to build dependency
masahir0y 2a42fe4
UPSTREAM: kbuild: deb-pkg: fix build error with O=
masahir0y 0d8e0b5
UPSTREAM: kbuild: deb-pkg: don't set KBUILD_BUILD_VERSION uncondition…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ | |
| # Wichert Akkerman <[email protected]>. | ||
| # | ||
|
|
||
| set -e | ||
| set -eu | ||
|
|
||
| # | ||
| # Some variables and settings used throughout the script | ||
|
|
||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| This is a packaged upstream version of the Linux kernel. | ||
|
|
||
| The sources may be found at most Linux archive sites, including: | ||
| https://www.kernel.org/pub/linux/kernel | ||
|
|
||
| Copyright: 1991 - 2023 Linus Torvalds and others. | ||
|
|
||
| The git repository for mainline kernel development is at: | ||
| git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git | ||
|
|
||
| This program is free software; you can redistribute it and/or modify | ||
| it under the terms of the GNU General Public License as published by | ||
| the Free Software Foundation; version 2 dated June, 1991. | ||
|
|
||
| On Debian GNU/Linux systems, the complete text of the GNU General Public | ||
| License version 2 can be found in `/usr/share/common-licenses/GPL-2'. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,93 @@ | ||
| #!/usr/bin/make -f | ||
| # SPDX-License-Identifier: GPL-2.0-only | ||
|
|
||
| include debian/rules.vars | ||
| # in case debian/rules is executed directly | ||
| export DEB_RULES_REQUIRES_ROOT := no | ||
|
|
||
| srctree ?= . | ||
| include debian/rules.vars | ||
|
|
||
| ifneq (,$(filter-out parallel=1,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))) | ||
| NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) | ||
| MAKEFLAGS += -j$(NUMJOBS) | ||
| endif | ||
|
|
||
| # When KBUILD_VERBOSE is undefined (presumably you are directly working with | ||
| # the debianized tree), show verbose logs unless DEB_BUILD_OPTION=terse is set. | ||
| ifeq ($(origin KBUILD_VERBOSE),undefined) | ||
| ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) | ||
| export KBUILD_VERBOSE := 1 | ||
| else | ||
| Q := @ | ||
| endif | ||
| endif | ||
|
|
||
| revision = $(shell dpkg-parsechangelog -S Version | sed -n 's/.*-//p') | ||
| CROSS_COMPILE ?= $(filter-out $(DEB_BUILD_GNU_TYPE)-, $(DEB_HOST_GNU_TYPE)-) | ||
| make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE) \ | ||
| $(addprefix KBUILD_BUILD_VERSION=,$(revision)) \ | ||
| $(addprefix CROSS_COMPILE=,$(CROSS_COMPILE)) | ||
|
|
||
| binary-targets := $(addprefix binary-, image image-dbg headers libc-dev) | ||
|
|
||
| all-packages = $(shell dh_listpackages) | ||
| image-package = $(filter linux-image-% user-%, $(filter-out %-dbg, $(all-packages))) | ||
| image-dbg-package = $(filter %-dbg, $(all-packages)) | ||
| libc-dev-package = $(filter linux-libc-dev, $(all-packages)) | ||
| headers-package = $(filter linux-headers-%, $(all-packages)) | ||
|
|
||
| mk-files = $(patsubst binary-%,debian/%.files,$1) | ||
| package = $($(@:binary-%=%-package)) | ||
|
|
||
| # DH_OPTION is an environment variable common for all debhelper commands. | ||
| # We could 'export' it, but here it is passed from the command line to clarify | ||
| # which package is being processed in the build log. | ||
| DH_OPTIONS = -p$(package) | ||
|
|
||
| define binary | ||
| $(Q)dh_testdir $(DH_OPTIONS) | ||
| $(Q)dh_testroot $(DH_OPTIONS) | ||
| $(Q)dh_prep $(DH_OPTIONS) | ||
| $(Q)+$(MAKE) $(make-opts) run-command KBUILD_RUN_COMMAND='+$$(srctree)/scripts/package/builddeb $(package)' | ||
| $(Q)dh_installdocs $(DH_OPTIONS) | ||
| $(Q)dh_installchangelogs $(DH_OPTIONS) | ||
| $(Q)dh_compress $(DH_OPTIONS) | ||
| $(Q)dh_fixperms $(DH_OPTIONS) | ||
| $(Q)dh_gencontrol $(DH_OPTIONS) -- -f$(call mk-files,$@) | ||
| $(Q)dh_md5sums $(DH_OPTIONS) | ||
| $(Q)dh_builddeb $(DH_OPTIONS) -- $(addprefix -Z,$(KDEB_COMPRESS)) | ||
| endef | ||
|
|
||
| .PHONY: $(binary-targets) | ||
| $(binary-targets): build-arch | ||
| $(Q)truncate -s0 $(call mk-files,$@) | ||
| $(if $(package),$(binary)) | ||
|
|
||
| .PHONY: binary binary-indep binary-arch | ||
| binary: binary-arch binary-indep | ||
| binary-indep: build-indep | ||
| binary-arch: build-arch | ||
| $(MAKE) -f $(srctree)/Makefile ARCH=$(ARCH) \ | ||
| KERNELRELEASE=$(KERNELRELEASE) \ | ||
| run-command KBUILD_RUN_COMMAND=+$(srctree)/scripts/package/builddeb | ||
| binary-arch: $(binary-targets) | ||
| $(Q)cat $(call mk-files,$^) > debian/files | ||
|
|
||
| .PHONY: build build-indep build-arch | ||
| build: build-arch build-indep | ||
| build-indep: | ||
| build-arch: | ||
| $(MAKE) -f $(srctree)/Makefile ARCH=$(ARCH) \ | ||
| KERNELRELEASE=$(KERNELRELEASE) \ | ||
| $(shell $(srctree)/scripts/package/deb-build-option) \ | ||
| olddefconfig all | ||
| $(Q)$(MAKE) $(make-opts) olddefconfig | ||
| $(Q)$(MAKE) $(make-opts) $(if $(filter um,$(ARCH)),,headers) all | ||
|
|
||
| .PHONY: clean | ||
| clean: | ||
| rm -rf debian/files debian/linux-* | ||
| $(MAKE) -f $(srctree)/Makefile ARCH=$(ARCH) clean | ||
| $(Q)dh_clean | ||
| $(Q)rm -rf debian/deb-env.vars* debian/*.files | ||
| $(Q)$(MAKE) ARCH=$(ARCH) clean | ||
|
|
||
| # If DEB_HOST_ARCH is empty, it is likely that debian/rules was executed | ||
| # directly. Run 'dpkg-architecture --print-set --print-format=make' to | ||
| # generate a makefile construct that exports all DEB_* variables. | ||
| ifndef DEB_HOST_ARCH | ||
| include debian/deb-env.vars | ||
|
|
||
| debian/deb-env.vars: | ||
| $(Q)dpkg-architecture -a$$(cat debian/arch) --print-set --print-format=make > [email protected] | ||
| $(Q)mv [email protected] $@ | ||
| endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| #!/bin/sh | ||
| # SPDX-License-Identifier: GPL-2.0-only | ||
|
|
||
| set -eu | ||
|
|
||
| diff_patch=$1 | ||
|
|
||
| mkdir -p "$(dirname "${diff_patch}")" | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path to
build-versionis incorrect. The variable$(src)evaluates toinitin this Makefile, so this would try to executeinit/scripts/build-versionwhich doesn't exist. The script has been moved toscripts/build-version, so this should be$(shell $(srctree)/scripts/build-version)instead.