Codebase list gpgme1.0 / 822958a
avoid -unknown suffix (Closes: #1004742) Daniel Kahn Gillmor 1 year, 11 months ago
3 changed file(s) with 106 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
0 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
1 Date: Thu, 11 Jun 2015 18:26:16 -0400
2 Subject: Remove upstream git fanciness
3
4 Debian needs to be able to build libgpg-error while using git for
5 tracking the debian packaging itself. Debian also wants to autoreconf
6 this stuff. However, Debian does *not* need to conform exactly to
7 upstream's git configurations.
8
9 This avoids mistakes like accidentally identifying running code as a
10 beta.
11
12 This is the same approach taken in debian's libgpg-error packaging
13 since 2017.
14
15 Forwarded: not-needed
16 ---
17 autogen.sh | 67 ++++----------------------------------------------------------
18 1 file changed, 4 insertions(+), 63 deletions(-)
19
20 diff --git a/autogen.sh b/autogen.sh
21 index 9b36158..5dfca0e 100755
22 --- a/autogen.sh
23 +++ b/autogen.sh
24 @@ -249,27 +249,10 @@ if [ "$myhost" = "find-version" ]; then
25 fi
26
27 beta=no
28 - if [ -e .git ]; then
29 - ingit=yes
30 - tmp=$(git describe --match "${matchstr1}" --long 2>/dev/null)
31 - tmp=$(echo "$tmp" | sed s/^"$package"//)
32 - if [ -n "$tmp" ]; then
33 - tmp=$(echo "$tmp" | sed s/^"$package"// \
34 - | awk -F- '$3!=0 && $3 !~ /^beta/ {print"-beta"$3}')
35 - else
36 - tmp=$(git describe --match "${matchstr2}" --long 2>/dev/null \
37 - | awk -F- '$4!=0{print"-beta"$4}')
38 - fi
39 - [ -n "$tmp" ] && beta=yes
40 - rev=$(git rev-parse --short HEAD | tr -d '\n\r')
41 - rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null)))
42 - else
43 - ingit=no
44 - beta=yes
45 - tmp="-unknown"
46 - rev="0000000"
47 - rvd="0"
48 - fi
49 + ingit=no
50 + tmp=""
51 + rvd="$(wc -l < debian/changelog)"
52 + rev="$(printf %07x $rvd)"
53
54 echo "$package-$vers$tmp:$beta:$ingit:$vers$tmp:$vers:$tmp:$rev:$rvd:"
55 exit 0
56 @@ -452,48 +435,6 @@ EOF
57 die_p
58 fi
59
60 -# Check the git setup.
61 -if [ -d .git ]; then
62 - CP="cp -p"
63 - # If we have a GNU cp we can add -v
64 - if cp --version >/dev/null 2>/dev/null; then
65 - [ -z "${SILENT}" ] && CP="$CP -v"
66 - fi
67 - if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
68 - [ -z "${SILENT}" ] && cat <<EOF
69 -*** Activating trailing whitespace git pre-commit hook. ***
70 - For more information see this thread:
71 - https://mail.gnome.org/archives/desktop-devel-list/2009-May/msg00084.html
72 - To deactivate this pre-commit hook again move .git/hooks/pre-commit
73 - and .git/hooks/pre-commit.sample out of the way.
74 -EOF
75 - $CP .git/hooks/pre-commit.sample .git/hooks/pre-commit
76 - chmod +x .git/hooks/pre-commit
77 - fi
78 -
79 - if [ "$gettext_vers" != "n/a" ]; then
80 - tmp=$(git config --get filter.cleanpo.clean)
81 - if [ "$tmp" != \
82 - "awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'" ]
83 - then
84 - info "*** Adding GIT filter.cleanpo.clean configuration."
85 - git config --add filter.cleanpo.clean \
86 - "awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'"
87 - fi
88 - fi
89 - if [ -f build-aux/git-hooks/commit-msg -a ! -f .git/hooks/commit-msg ] ; then
90 - [ -z "${SILENT}" ] && cat <<EOF
91 -*** Activating commit log message check hook. ***
92 -EOF
93 - $CP build-aux/git-hooks/commit-msg .git/hooks/commit-msg
94 - chmod +x .git/hooks/commit-msg
95 - if [ x"${display_name}" != x ]; then
96 - git config format.subjectPrefix "PATCH ${display_name}"
97 - git config sendemail.to "${patches_to}"
98 - fi
99 - fi
100 -fi
101 -
102 aclocal_flags="-I m4"
103 if [ -n "${extra_aclocal_flags}" ]; then
104 aclocal_flags="${aclocal_flags} ${extra_aclocal_flags}"
+0
-27
debian/patches/0001-avoid-identifying-as-beta.patch less more
0 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
1 Date: Thu, 11 Jun 2015 18:26:16 -0400
2 Subject: avoid identifying as beta
3
4 If we build from git-buildpackage using autoreconf, it comes out
5 looking like a beta because we're not on a git tag.
6
7 This patch avoids that situation.
8
9 Forwarded: not-needed
10 ---
11 autogen.sh | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14 diff --git a/autogen.sh b/autogen.sh
15 index 9b36158..5cfc244 100755
16 --- a/autogen.sh
17 +++ b/autogen.sh
18 @@ -249,7 +249,7 @@ if [ "$myhost" = "find-version" ]; then
19 fi
20
21 beta=no
22 - if [ -e .git ]; then
23 + if false; then
24 ingit=yes
25 tmp=$(git describe --match "${matchstr1}" --long 2>/dev/null)
26 tmp=$(echo "$tmp" | sed s/^"$package"//)
0 0001-avoid-identifying-as-beta.patch
0 0001-Remove-upstream-git-fanciness.patch
11 0002-drop-python2-support.patch
22 0003-Ship-python-examples-with-python3-in-shebang-line.patch
33 0004-Avoid-the-hardcoded-list-of-Python-versions.patch