[SCM] musescore/master: Prepare for upstream update
shoogle-guest at users.alioth.debian.org
shoogle-guest at users.alioth.debian.org
Sat Jun 18 10:27:10 UTC 2016
The following commit has been merged in the master branch:
commit 55d0ec03aca05f2e1012a3d27d81018ee8e5ad5f
Author: Peter Jonas <pjonas56 at gmail.com>
Date: Sat Jun 18 01:48:02 2016 +0100
Prepare for upstream update
- Update syntax for debian/gbp.conf and debian/watch
- Add Files-Excluded field to debian/copyright
- Updated debian/repack since DFSG now handled by uscan
- Updated debian/README.debian
diff --git a/debian/README.Debian b/debian/README.Debian
index e3053e0..ee43594 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -12,20 +12,25 @@ musescore for Debian
Upstream tracks bugs against the Git short commit number (first 7 digits of
upstream commit SHA). This is the "revision" displayed in MuseScore's Help ->
About dialog. This number is stored in the file mscore/revision.h and must be
- set *after* importing a new upstream version. This is done automatically if
- the new version is imported via `uscan` or `debian/rules get-orig-source`. The
- recommended method for importing a new upstream release is as follows:
-
- uscan --verbose
- gbp import-orig --merge-mode=replace ../musescore_$(VER)+dfsg.orig.tar.gz
-
- * uscan fetches the upstream tarball, unpacks it, makes changes necessary
- for DFSG compliance, and repacks into a dfsg tarball (see debian/repack).
- * gbp (git-buildpackage) unpacks the dfsg tarball and commits the changes.
- gbp version 0.7.2 or later required. (Note: gbp import-orig --uscan wont
- work because it uses the upstream tarball instead of the dfsg tarball.)
- * If you don't have gbp just run uscan, then delete everything in the repo
- (except the "debian" and ".git" directories) and then unpack the dfsg
- tarball into the repo. Update patches and changelog. Commit the changes.
+ set in the upstream code *after* importing a new upstream version. This is
+ done automatically if the new version is imported via `gbp import-orig`,
+ `uscan` or `debian/rules get-orig-source`. The easiest way to update is:
+
+ $ gbp import-orig --uscan
+
+ What this command does:
+
+ 1) Checks debian/gbp.conf for various options, then calls `uscan`.
+
+ 2) 'uscan' fetches the upstream tarball, removes files listed under
+ "Files-Excluded" in debian/copyright, and then runs debian/repack.
+
+ 3) debian/repack checks for DFSG compliance and sets the revision number.
+
+ 4) gbp unpacks the tarball, updates debian/changelog, commits the changes.
+
+ If you don't have gbp just run 'uscan --verbose', then delete everything in
+ the repo (except for the "debian" and ".git" directories) and then unpack the
+ dfsg tarball into the repo. Update the changelog. Commit the changes.
-- Peter Jonas <pjonas56 at gmail.com>
diff --git a/debian/copyright b/debian/copyright
index 5ff723c..0f67a09 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -4,6 +4,9 @@ Upstream-Contact: https://musescore.org/
Source: https://github.com/musescore/MuseScore/
Copyright: 2015, Werner Schweer and others
License: GPL-2 with Font exception
+Files-Excluded: *.pdf
+ thirdparty/rtf2html/rtf2html
+Comment: PDFs and binary files removed to comply with the DFSG.
License: GPL-2 with Font exception
If you want to redistribute MuseScore, you must comply with the GNU
diff --git a/debian/gbp.conf b/debian/gbp.conf
index be885f5..2a56531 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -3,29 +3,31 @@
[DEFAULT]
# use pristine-tar:
pristine-tar = True
-# tell git-buildpackage howto clean the source tree
+# tell git-buildpackage how to clean the source tree
cleaner = fakeroot debian/rules clean
# this is how we invoke pbuilder, arguments passed to git-buildpackage will be
# passed to dpkg-buildpackge in the chroot
builder = /usr/bin/git-pbuilder
compression = xz
-# Options only affecting git-buildpackage
-[git-buildpackage]
+# Options only affecting gbp-buildpackage
+[buildpackage]
# uncomment this to automatically GPG sign tags:
sign-tags = True
# call lintian after a successful build:
postbuild = lintian $GBP_CHANGES_FILE
-# Options only affecting git-import-orig
+# Options only affecting gbp-import-orig
[import-orig]
+# resolve conflicts in favor of upstream changes
+merge-mode = replace
# run hook after the import:
-postimport = git-dch -N%(version)s -S -a --debian-branch=$GBP_BRANCH
+postimport = gbp dch -N%(version)s -S -a --debian-branch=$GBP_BRANCH
# commit message:
import-msg = New upstream version %(version)s
-# Options only affecting git-dch
-[git-dch]
+# Options only affecting gbp-dch
+[dch]
# what tags to look for to generate bug-closing changelog entries:
meta-closes = Closes|LP
# include the full commit message in the changelog:
diff --git a/debian/repack b/debian/repack
index d0a344f..0aba22e 100755
--- a/debian/repack
+++ b/debian/repack
@@ -1,18 +1,18 @@
#!/bin/bash
# debian/repack - Produce DFSG compliant orig.tar.gz from upstream tarball.
# 1) Unpack upstream tarball.
-# 2) Set revision number in mscore/revision.h to match Git commit number.
-# 3) Ensure DSFG compliance (removes precompiled binaries and PDFs).
+# 2) Check for DSFG compliance (no PDFs or precompiled binaries).
+# 3) Set revision number in mscore/revision.h to match Git commit number.
# 4) Pack into orig.tar.gz
set -e # exit on error
function usage() {
cat <<EOF
-debian/repack - Produce DFSG compliant orig.tar.gz from upstream tarball.
+debian/repack - set MuseScore revision number and check for DFSG compliance.
-Usage: debian/repack --upstream-version VERSION UPSTREAM-TARBALL
-Example: debian/repack --upstream-version "2.0.1" "../v2.0.1.tar.gz"
+Usage: debian/repack --upstream-version VERSION [UPSTREAM-TARBALL]
+Example: debian/repack --upstream-version "2.0.1+dfsg1"
EOF
}
@@ -23,14 +23,22 @@ if [ "$1" != "--upstream-version" ] || [ ! "$2" ]; then
exit 1
fi
-if [ ! -f "$3" ]; then
- printf "$0: Error! Upstream tarball was not specified.\n\n$(usage)\n" >&2
+version="$2"
+if [[ $version == *"+dfsg"* ]]; then
+ dfsg="+dfsg${version#*+dfsg}"
+ version="${version%+dfsg*}"
+fi
+[ "$3" ] && tarpath="$3" || tarpath="../musescore_$version$dfsg.orig.tar.gz"
+
+echo "$0: Repacking upstream tarball '$tarpath'." >&2
+
+if [ ! -f "$tarpath" ]; then
+ printf "$0: Error! Upstream tarball not found.\n\n$(usage)\n" >&2
exit 1
fi
-version="$2"
-tarball="$(basename "$3")"
-outdir="$(dirname "$3")" # output files to same dir as input files were located
+tarball="$(basename "$tarpath")"
+outdir="$(dirname "$tarpath")" # send output files to input directory
if [ "$(which realpath)" ]; then
outdir="$(realpath --relative-to="$PWD" "$outdir")"
@@ -45,7 +53,7 @@ if [ -L "$tarball" ]; then
tarball="$(readlink "$symlink")"
fi
-tempdir="tmp-musescore-$version"
+tempdir="tmp-musescore-$version$dfsg"
# 1) Unpack upstream tarball
echo "Unpacking upstream tarball into '$tempdir'." >&2
@@ -53,7 +61,40 @@ mkdir "$tempdir"
tar -zxf "$tarball" -C "$tempdir"
cd "$tempdir/MuseScore-$version"
-# 2) Set revision number in mscore/revision.h to match upstream Git commit
+# 2) Check for DSFG compliance (no precompiled binaries or PDFs, etc).
+cat >&2 <<EOF
+Checking for DFSG compliance. If any non compliant files are discovered then
+they will be printed on the Terminal and then this script will exit. The non-
+compliant files must be added to the Files-Excluded list within debian/copyright
+and then you will need to run 'uscan' or 'gbp import-orig' again. See USCAN(1).
+EOF
+
+dfsg_compliant="TRUE"
+
+echo "Searching for PDF files..." >&2
+pdfs="$(find . -iname "*.pdf" -print)"
+if [ "$pdfs" ]; then
+ echo "$pdfs"
+ echo "PDF files were discovered. PDFs are non DFSG-free." >&2
+ echo "Please add them to Files-Excluded in debian/copyright." >&2
+ dfsg_compliant="FALSE"
+fi
+
+echo "Searching for precompiled binaries..." >&2
+binaries="$(find . -type f -executable -exec sh -c "file -i '{}' | grep -q 'x-executable; charset=binary'" \; -print)"
+if [ "$binaries" ]; then
+ echo "$binaries"
+ echo "Binary files were discovered. Binaries are non DFSG-free." >&2
+ echo "Please add them to Files-Excluded in debian/copyright." >&2
+ dfsg_compliant="FALSE"
+fi
+
+if [ "$dfsg_compliant" == "FALSE" ]; then
+ echo "You will need to run 'uscan' or 'gbp import-orig' again afterwards." >&2
+ exit 1
+fi
+
+# 3) Set revision number in mscore/revision.h to match upstream Git commit
# Note: upstream has a Makefile target "make revision" to set the revision, but
# it only works inside a Git repo so we have to get the revision another way.
echo "Determining upstream revision (first 7 characters of Git commit SHA)." >&2
@@ -73,39 +114,28 @@ fi
echo "Upstream revision is '$commit'." >&2
echo "Setting revision number in 'mscore/revision.h' to '$commit'." >&2
+mtime="$(stat -c %y "mscore/revision.h")" # preserve modification time
echo "$commit" > "mscore/revision.h"
-
-# 3) Ensure DSFG compliance (remove precompiled binaries and PDFs, etc).
-echo "Making changes to ensure DFSG compliance." >&2
-
-echo "Removing PDF files." >&2
-echo "Files-Excluded:"
-find . -iname "*.pdf" -exec rm "{}" \; -exec echo " {}" \;
-echo "Comment: PDFs removed for DFSG compliance (not a transparent format)."
-
-echo "Removing precompiled binaries." >&2
-echo "Files-Excluded:"
-find -type f -executable \
- -exec sh -c "file -i '{}' | grep -q 'x-executable; charset=binary'" \; \
- -exec rm "{}" \; -exec echo " {}" \;
-echo "Comment: Binaries removed for DFSG compliance (not a transparent format)."
+touch -d "$mtime" "mscore/revision.h"
# 4) Pack into orig.tar.gz
cd .. # now inside $tempdir
-mv "MuseScore-$version" "musescore-$version+dfsg"
-tar -cf "../musescore_$version+dfsg.orig.tar" "musescore-$version+dfsg"
+mv "MuseScore-$version" "musescore-$version$dfsg"
+tar -cf "../musescore_$version$dfsg.orig.tar" "musescore-$version$dfsg"
cd .. # now back to output directory (outside $tempdir)
-gzip -9 "musescore_$version+dfsg.orig.tar"
-# Tidy up
+# Tidy up (must do this before compressing tar incase tarball has same name)
echo "Removing temporary files." >&2
rm -rf "$tempdir" "$tarball" "$symlink"
+# Compress new orig.tar
+gzip -9 "musescore_$version$dfsg.orig.tar"
+
cat >&2 <<EOF
Finished!
-The upstream code is in "$outdir/musescore_$version+dfsg.orig.tar.gz".
+The upstream code is in "$outdir/musescore_$version$dfsg.orig.tar.gz".
Use 'uupdate' to upgrade the source package based on the upstream release:
- \$ uupdate --upstream-version $version $outdir/musescore_$version+dfsg.orig.tar.gz
+ \$ uupdate --upstream-version $version $outdir/musescore_$version$dfsg.orig.tar.gz
Or, if working in a Git repository, use git-buildpackage to update the source:
- \$ gbp import-orig --merge-mode=replace $outdir/musescore_$version+dfsg.orig.tar.gz
+ \$ gbp import-orig --merge-mode=replace $outdir/musescore_$version$dfsg.orig.tar.gz
EOF
diff --git a/debian/watch b/debian/watch
index 56dfd65..5d67878 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,8 +1,8 @@
# debian/watch - check for a new upstream release and fetch it. See USCAN(1).
# The script 'debian/repack' is called to perform changes for DFSG compliance.
-version=3
+version=4
opts=\
-dversionmangle=s/\+dfsg\d*$//,\
+dversionmangle=s/\+dfsg\d*$//,repacksuffix=+dfsg1,\
filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/MuseScore-$1\.tar\.gz/ \
https://github.com/musescore/MuseScore/tags .*/v?(\d\S*)\.tar\.gz \
debian debian/repack
--
musescore packaging
More information about the pkg-multimedia-commits
mailing list