Convert source package format to 3.0 (quilt)

svn path=/dists/sid/linux/; revision=19098
This commit is contained in:
Ben Hutchings 2012-06-08 12:33:39 +00:00
parent 1f51066386
commit 59bbce5f61
7 changed files with 47 additions and 41 deletions

View File

@ -55,26 +55,24 @@ if [ "${version%a~test}" = "$version" ]; then
dch -v "$version" --distribution UNRELEASED "Testing patches $*"
fi
restrictfeature=
# Make new directory for patches
mkdir -p debian/patches/test
# Ignore user's .quiltrc
alias quilt='quilt --quiltrc -'
# Try to clean up any previous test patches
if [ "$featureset" = none ]; then
series="series-all"
while quilt top 2>/dev/null | grep -q ^test/; do
quilt delete
done
else
series="series-${featureset}"
sed -i '/^test\//d' debian/patches/series-${featureset}
fi
# Copy all patches into a new directory
# Prepare a new directory for the patches
rm -rf debian/patches/test/
mkdir debian/patches/test
cp -t debian/patches/test/ "$@"
# Try to clean up any test patches on exit, but also do it now just in case
sed -i '/^test\//d' debian/patches/"$series"
trap "sed -i '/^test\//d' debian/patches/\"$series\"" EXIT
# Append to patch series
for patch in "$@"; do
echo "test/$(basename "$patch")" >>debian/patches/"$series"
done
# Regenerate control and included rules
rm debian/control debian/rules.gen
@ -82,9 +80,17 @@ debian/rules debian/control-real && exit 1 || true
test -f debian/control
test -f debian/rules.gen
# Clean and patch source
# Clean up old build; apply existing patches for featureset
debian/rules clean
debian/rules source
# Apply the additional patches
for patch in "$@"; do
patch_abs="$(readlink -f "$patch")"
(cd "debian/build/source_${featureset}" && \
quilt import -P "test/$(basename "$patch")" "$patch_abs" && \
quilt push --fuzz=0)
done
# Build selected binaries
fakeroot make -f debian/rules.gen binary-arch_"$arch"_"$featureset"_"$flavour"

5
debian/changelog vendored
View File

@ -1,9 +1,11 @@
linux (3.2.19-2) UNRELEASED; urgency=low
* The "Not Quite So Many Different Version Numbers" release
* The "Confused? You Won't Be" release
[ Ben Hutchings ]
* Rename source package to 'linux' (Closes: #636010)
* Convert source package format to 3.0 (quilt)
- Convert patch system to quilt, except for the 'orig' patch series
* linux-image: Change package name for bugs to 'src:linux' (Closes: #644198)
* DFSG: video: Remove nvidiafb and rivafb, which include apparently
obfuscated code (Closes: #383481). The nouveau driver supports all
@ -16,7 +18,6 @@ linux (3.2.19-2) UNRELEASED; urgency=low
* linux-patch-debian: Remove; it is no longer necessary for GPL compliance
and does not work with our current patch management
* test-patches: Recognise the rt featureset automatically
* Convert patch system to quilt, except for the 'orig' patch series
* udeb: Build-Depend on kernel-wedge >= 2.84; this allows us to list
modules as required even if they are built-in in some configurations
* filter: Allow to create sk-unattached filters

3
debian/rules vendored
View File

@ -43,7 +43,8 @@ TAR_ORIG_NAME = $(SOURCE)_$(VERSION_UPSTREAM).orig.tar.gz
TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME)))
orig: $(DIR_ORIG)
rsync --delete --exclude debian --exclude .svk --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ .
rsync --delete --exclude /debian --exclude .svk --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ .
QUILT_PATCHES='$(CURDIR)/debian/patches' quilt push --quiltrc - -a -q --fuzz=0
$(DIR_ORIG):
ifeq ($(TAR_ORIG),)

41
debian/rules.real vendored
View File

@ -60,37 +60,37 @@ source-featureset: $(STAMPS_DIR)/source_$(FEATURESET)
$(BUILD_DIR)/config.$(ARCH)_$(FEATURESET)_$(FLAVOUR): $(KCONFIG)
python debian/bin/kconfig.py '$@' $(KCONFIG) $(KCONFIG_OPTIONS)
$(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.bz2: SOURCE_DIR=$(BUILD_DIR)/source
define copy_source
mkdir -p '$(1)'
cp -al $(filter-out debian .pc .svk .svn, $(wildcard * .[^.]*)) '$(1)'
endef
$(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.bz2: DIR = $(BUILD_DIR)/linux-source-$(UPSTREAMVERSION)
$(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.bz2: $(STAMPS_DIR)/source
rm -rf '$@' '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
$(call copy_source,$(DIR))
chmod -R u+rw,go=rX '$(DIR)'
cd '$(BUILD_DIR)'; tar -cjf 'linux-source-$(UPSTREAMVERSION).tar.bz2' 'linux-source-$(UPSTREAMVERSION)'
rm -rf '$(DIR)'
define patch_cmd
cd '$(DIR)' && QUILT_PATCHES='$(CURDIR)/debian/patches' QUILT_SERIES=series-$(1) quilt push --quiltrc - -a -q --fuzz=1
cd '$(DIR)' && QUILT_PATCHES='$(CURDIR)/debian/patches' QUILT_SERIES=series-$(1) quilt push --quiltrc - -a -q --fuzz=0
endef
$(STAMPS_DIR)/source: SOURCE_FILES = $(filter-out debian, $(wildcard * .[^.]*))
$(STAMPS_DIR)/source: DIR = $(BUILD_DIR)/source
$(STAMPS_DIR)/source:
rm -rf '$(DIR)'
mkdir -p '$(DIR)'
cp -al $(SOURCE_FILES) '$(DIR)'
$(call patch_cmd,all)
test -d .pc
set +e; quilt unapplied --quiltrc - >/dev/null && echo 'Patch series not fully applied'; test $$? -eq 1
@$(stamp)
$(STAMPS_DIR)/source_$(FEATURESET): SOURCE_DIR=$(BUILD_DIR)/source
$(STAMPS_DIR)/source_$(FEATURESET): DIR=$(BUILD_DIR)/source_$(FEATURESET)
$(STAMPS_DIR)/source_$(FEATURESET): $(STAMPS_DIR)/source
mkdir -p '$(BUILD_DIR)'
rm -rf '$(DIR)'
ifeq ($(FEATURESET),none)
ln -s source '$(DIR)'
ln -s '$(CURDIR)' '$(DIR)'
else
cp -al '$(SOURCE_DIR)' '$(DIR)'
rm -rf '$(DIR)/.pc'
$(call copy_source,$(DIR))
$(call patch_cmd,$(FEATURESET))
endif
@$(stamp)
@ -136,13 +136,12 @@ $(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_plain-s390x-tape:
python debian/bin/buildcheck.py $(DIR) $(ARCH) $(FEATURESET) $(FLAVOUR)
@$(stamp)
$(STAMPS_DIR)/build-doc: SOURCE_DIR=$(BUILD_DIR)/source
$(STAMPS_DIR)/build-doc: DIR=$(BUILD_DIR)/build-doc
$(STAMPS_DIR)/build-doc: $(STAMPS_DIR)/source
rm -rf $(DIR)
mkdir $(DIR)
+$(MAKE_CLEAN) -C $(SOURCE_DIR) O='$(CURDIR)/$(DIR)' xmldocs
+$(MAKE_CLEAN) -C $(SOURCE_DIR) O='$(CURDIR)/$(DIR)' htmldocs mandocs
mkdir -p $(DIR)
+$(MAKE_CLEAN) O='$(CURDIR)/$(DIR)' xmldocs
+$(MAKE_CLEAN) O='$(CURDIR)/$(DIR)' htmldocs mandocs
@$(stamp)
install-base:
@ -164,14 +163,13 @@ install-dummy:
install-doc: PACKAGE_NAME = linux-doc-$(VERSION)
install-doc: DIR = $(BUILD_DIR)/build-doc
install-doc: SOURCE_DIR = $(BUILD_DIR)/source
install-doc: PACKAGE_DIR = debian/$(PACKAGE_NAME)
install-doc: OUT_DIR = $(PACKAGE_DIR)/usr/share/doc/$(PACKAGE_NAME)
install-doc: DH_OPTIONS = -p$(PACKAGE_NAME)
install-doc: $(STAMPS_DIR)/build-doc
dh_prep
mkdir -p $(OUT_DIR)
cp -a $(addprefix $(SOURCE_DIR)/, CREDITS MAINTAINERS README REPORTING-BUGS Documentation) $(OUT_DIR)
cp -a CREDITS MAINTAINERS README REPORTING-BUGS Documentation $(OUT_DIR)
rm -rf $(OUT_DIR)/Documentation/DocBook
cd $(DIR)/Documentation/DocBook; \
find * -name '*.html' -print \
@ -280,7 +278,6 @@ endif
install-libc-dev_$(ARCH): PACKAGE_NAME = linux-libc-dev
install-libc-dev_$(ARCH): DH_OPTIONS = -p$(PACKAGE_NAME)
install-libc-dev_$(ARCH): SOURCE_DIR = $(BUILD_DIR)/source
install-libc-dev_$(ARCH): DIR = $(BUILD_DIR)/build-libc-dev
install-libc-dev_$(ARCH): OUT_DIR = debian/$(PACKAGE_NAME)/usr
install-libc-dev_$(ARCH):
@ -288,9 +285,9 @@ install-libc-dev_$(ARCH):
dh_testroot
dh_prep
rm -rf '$(DIR)'
mkdir $(DIR)
+$(MAKE_CLEAN) -C $(SOURCE_DIR) O='$(CURDIR)/$(DIR)' headers_check ARCH=$(KERNEL_ARCH)
+$(MAKE_CLEAN) -C $(SOURCE_DIR) O='$(CURDIR)/$(DIR)' headers_install ARCH=$(KERNEL_ARCH) INSTALL_HDR_PATH='$(CURDIR)'/$(OUT_DIR)
mkdir -p $(DIR)
+$(MAKE_CLEAN) O='$(CURDIR)/$(DIR)' headers_check ARCH=$(KERNEL_ARCH)
+$(MAKE_CLEAN) O='$(CURDIR)/$(DIR)' headers_install ARCH=$(KERNEL_ARCH) INSTALL_HDR_PATH='$(CURDIR)'/$(OUT_DIR)
rm -rf $(OUT_DIR)/include/drm $(OUT_DIR)/include/scsi
find $(OUT_DIR)/include \( -name .install -o -name ..install.cmd \) -execdir rm {} +

View File

@ -1,2 +1,2 @@
1.0
3.0 (quilt)

1
debian/source/local-options vendored Normal file
View File

@ -0,0 +1 @@
abort-on-upstream-changes