packaging: move contrib/debian to contrib/packaging/
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 12 May 2018 17:16:09 -0700
changeset 38009 e51c91c14a07
parent 38008 b7cd9e94c259
child 38010 142998a45056
packaging: move contrib/debian to contrib/packaging/ Differential Revision: https://phab.mercurial-scm.org/D3547
contrib/debian/cacerts.rc
contrib/debian/changelog
contrib/debian/compat
contrib/debian/control
contrib/debian/copyright
contrib/debian/default-tools.rc
contrib/debian/hgkpath.rc
contrib/debian/rules
contrib/packaging/builddeb
contrib/packaging/debian/cacerts.rc
contrib/packaging/debian/changelog
contrib/packaging/debian/compat
contrib/packaging/debian/control
contrib/packaging/debian/copyright
contrib/packaging/debian/default-tools.rc
contrib/packaging/debian/hgkpath.rc
contrib/packaging/debian/rules
tests/hghave.py
--- a/contrib/debian/cacerts.rc	Sat May 12 10:41:08 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-# This config file points Mercurial at the system-wide certificate
-# store from the ca-certificates package.
-
-[web]
-cacerts = /etc/ssl/certs/ca-certificates.crt
--- a/contrib/debian/changelog	Sat May 12 10:41:08 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-mercurial (__VERSION__) __CODENAME__; urgency=medium
-
-  * Automated build performed by upstream.
-
- -- Mercurial Devel <mercurial-devel@mercurial-scm.org>  __DATE__
--- a/contrib/debian/compat	Sat May 12 10:41:08 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-9
--- a/contrib/debian/control	Sat May 12 10:41:08 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-Source: mercurial
-Section: vcs
-Priority: optional
-Maintainer: Mercurial Developers <mercurial-devel@mercurial-scm.org>
-Build-Depends:
- debhelper (>= 9),
- dh-python,
- less,
- netbase,
- python-all,
- python-all-dev,
- python-docutils,
- unzip,
- zip
-Standards-Version: 3.9.4
-X-Python-Version: >= 2.7
-
-Package: mercurial
-Depends:
- python,
- ${shlibs:Depends},
- ${misc:Depends},
- ${python:Depends},
- mercurial-common (= ${source:Version})
-Architecture: any
-Description: fast, easy to use, distributed revision control tool.
- Mercurial is a fast, lightweight Source Control Management system designed
- for efficient handling of very large distributed projects.
- .
- Its features include:
-  * O(1) delta-compressed file storage and retrieval scheme
-  * Complete cross-indexing of files and changesets for efficient exploration
-    of project history
-  * Robust SHA1-based integrity checking and append-only storage model
-  * Decentralized development model with arbitrary merging between trees
-  * Easy-to-use command-line interface
-  * Integrated stand-alone web interface
-  * Small Python codebase
-
-Package: mercurial-common
-Architecture: all
-Depends:
- ${misc:Depends},
- ${python:Depends},
-Recommends: mercurial (= ${source:Version}), ca-certificates
-Suggests: wish
-Breaks: mercurial (<< ${source:Version})
-Replaces: mercurial (<< 2.6.3)
-Description: easy-to-use, scalable distributed version control system (common files)
- Mercurial is a fast, lightweight Source Control Management system designed
- for efficient handling of very large distributed projects.
- .
- This package contains the architecture independent components of Mercurial,
- and is generally useless without the mercurial package.
--- a/contrib/debian/copyright	Sat May 12 10:41:08 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: mercurial
-Source: https://www.mercurial-scm.org/
-
-Files: *
-Copyright: 2005-2018, Matt Mackall <mpm@selenic.com> and others.
-License: GPL-2+
- 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; either
- version 2 of the License, or (at your option) any later
- version.
- .
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- PURPOSE.  See the GNU General Public License for more
- details.
- .
- You should have received a copy of the GNU General Public
- License along with this package; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- Boston, MA  02110-1301 USA
- .
- On Debian systems, the full text of the GNU General Public
- License version 2 can be found in the file
- `/usr/share/common-licenses/GPL-2'.
--- a/contrib/debian/default-tools.rc	Sat May 12 10:41:08 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-[ui]
-editor = sensible-editor
-
-[pager]
-pager = sensible-pager
--- a/contrib/debian/hgkpath.rc	Sat May 12 10:41:08 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-[hgk]
-path = /usr/share/mercurial/hgk
--- a/contrib/debian/rules	Sat May 12 10:41:08 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-#!/usr/bin/make -f
-# Uncomment this to turn on verbose mode.
-# export DH_VERBOSE=1
-
-CPUS=$(shell cat /proc/cpuinfo | grep -E ^processor | wc -l)
-
-%:
-	dh $@ --with python2
-
-override_dh_auto_test:
-	http_proxy='' dh_auto_test -- TESTFLAGS="-j$(CPUS)"
-
-override_dh_python2:
-	dh_python2
-	find debian/mercurial/usr/share -type d -empty -delete
-
-override_dh_install:
-	python$(PYVERS) setup.py install --root "$(CURDIR)"/debian/mercurial --install-layout=deb
-	# chg
-	make -C contrib/chg \
-		DESTDIR="$(CURDIR)"/debian/mercurial \
-		PREFIX=/usr \
-		clean install
-	# remove arch-independent python stuff
-	find "$(CURDIR)"/debian/mercurial/usr/lib \
-		! -name '*.so' ! -type d -delete , \
-		-type d -empty -delete
-	python$(PYVERS) setup.py install --root "$(CURDIR)/debian/mercurial-common" --install-layout=deb
-	make install-doc PREFIX="$(CURDIR)"/debian/mercurial-common/usr
-	# remove arch-dependent python stuff
-	find "$(CURDIR)"/debian/mercurial-common/usr/lib \
-		-name '*.so' ! -type d -delete , \
-		-type d -empty -delete
-	cp contrib/hg-ssh "$(CURDIR)"/debian/mercurial-common/usr/bin
-	mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
-	cp contrib/hgk "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
-	mkdir -p "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
-	cp contrib/debian/*.rc "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
-	# completions
-	mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions
-	cp contrib/bash_completion "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions/hg
-	mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions
-	cp contrib/zsh_completion "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions/_hg
-	rm "$(CURDIR)"/debian/mercurial-common/usr/bin/hg
--- a/contrib/packaging/builddeb	Sat May 12 10:41:08 2018 -0700
+++ b/contrib/packaging/builddeb	Sat May 12 17:16:09 2018 -0700
@@ -73,7 +73,7 @@
         exit 1
     fi
 
-    cp -r "$PWD"/contrib/debian debian
+    cp -r "$PWD"/contrib/packaging/debian debian
 
     sed -i.tmp "s/__VERSION__/$debver/" $changelog
     sed -i.tmp "s/__DATE__/$(date --rfc-2822)/" $changelog
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/packaging/debian/cacerts.rc	Sat May 12 17:16:09 2018 -0700
@@ -0,0 +1,5 @@
+# This config file points Mercurial at the system-wide certificate
+# store from the ca-certificates package.
+
+[web]
+cacerts = /etc/ssl/certs/ca-certificates.crt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/packaging/debian/changelog	Sat May 12 17:16:09 2018 -0700
@@ -0,0 +1,5 @@
+mercurial (__VERSION__) __CODENAME__; urgency=medium
+
+  * Automated build performed by upstream.
+
+ -- Mercurial Devel <mercurial-devel@mercurial-scm.org>  __DATE__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/packaging/debian/compat	Sat May 12 17:16:09 2018 -0700
@@ -0,0 +1,1 @@
+9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/packaging/debian/control	Sat May 12 17:16:09 2018 -0700
@@ -0,0 +1,54 @@
+Source: mercurial
+Section: vcs
+Priority: optional
+Maintainer: Mercurial Developers <mercurial-devel@mercurial-scm.org>
+Build-Depends:
+ debhelper (>= 9),
+ dh-python,
+ less,
+ netbase,
+ python-all,
+ python-all-dev,
+ python-docutils,
+ unzip,
+ zip
+Standards-Version: 3.9.4
+X-Python-Version: >= 2.7
+
+Package: mercurial
+Depends:
+ python,
+ ${shlibs:Depends},
+ ${misc:Depends},
+ ${python:Depends},
+ mercurial-common (= ${source:Version})
+Architecture: any
+Description: fast, easy to use, distributed revision control tool.
+ Mercurial is a fast, lightweight Source Control Management system designed
+ for efficient handling of very large distributed projects.
+ .
+ Its features include:
+  * O(1) delta-compressed file storage and retrieval scheme
+  * Complete cross-indexing of files and changesets for efficient exploration
+    of project history
+  * Robust SHA1-based integrity checking and append-only storage model
+  * Decentralized development model with arbitrary merging between trees
+  * Easy-to-use command-line interface
+  * Integrated stand-alone web interface
+  * Small Python codebase
+
+Package: mercurial-common
+Architecture: all
+Depends:
+ ${misc:Depends},
+ ${python:Depends},
+Recommends: mercurial (= ${source:Version}), ca-certificates
+Suggests: wish
+Breaks: mercurial (<< ${source:Version})
+Replaces: mercurial (<< 2.6.3)
+Description: easy-to-use, scalable distributed version control system (common files)
+ Mercurial is a fast, lightweight Source Control Management system designed
+ for efficient handling of very large distributed projects.
+ .
+ This package contains the architecture independent components of Mercurial,
+ and is generally useless without the mercurial package.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/packaging/debian/copyright	Sat May 12 17:16:09 2018 -0700
@@ -0,0 +1,27 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: mercurial
+Source: https://www.mercurial-scm.org/
+
+Files: *
+Copyright: 2005-2018, Matt Mackall <mpm@selenic.com> and others.
+License: GPL-2+
+ 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; either
+ version 2 of the License, or (at your option) any later
+ version.
+ .
+ This program is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.  See the GNU General Public License for more
+ details.
+ .
+ You should have received a copy of the GNU General Public
+ License along with this package; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ Boston, MA  02110-1301 USA
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-2'.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/packaging/debian/default-tools.rc	Sat May 12 17:16:09 2018 -0700
@@ -0,0 +1,5 @@
+[ui]
+editor = sensible-editor
+
+[pager]
+pager = sensible-pager
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/packaging/debian/hgkpath.rc	Sat May 12 17:16:09 2018 -0700
@@ -0,0 +1,2 @@
+[hgk]
+path = /usr/share/mercurial/hgk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/packaging/debian/rules	Sat May 12 17:16:09 2018 -0700
@@ -0,0 +1,44 @@
+#!/usr/bin/make -f
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+CPUS=$(shell cat /proc/cpuinfo | grep -E ^processor | wc -l)
+
+%:
+	dh $@ --with python2
+
+override_dh_auto_test:
+	http_proxy='' dh_auto_test -- TESTFLAGS="-j$(CPUS)"
+
+override_dh_python2:
+	dh_python2
+	find debian/mercurial/usr/share -type d -empty -delete
+
+override_dh_install:
+	python$(PYVERS) setup.py install --root "$(CURDIR)"/debian/mercurial --install-layout=deb
+	# chg
+	make -C contrib/chg \
+		DESTDIR="$(CURDIR)"/debian/mercurial \
+		PREFIX=/usr \
+		clean install
+	# remove arch-independent python stuff
+	find "$(CURDIR)"/debian/mercurial/usr/lib \
+		! -name '*.so' ! -type d -delete , \
+		-type d -empty -delete
+	python$(PYVERS) setup.py install --root "$(CURDIR)/debian/mercurial-common" --install-layout=deb
+	make install-doc PREFIX="$(CURDIR)"/debian/mercurial-common/usr
+	# remove arch-dependent python stuff
+	find "$(CURDIR)"/debian/mercurial-common/usr/lib \
+		-name '*.so' ! -type d -delete , \
+		-type d -empty -delete
+	cp contrib/hg-ssh "$(CURDIR)"/debian/mercurial-common/usr/bin
+	mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
+	cp contrib/hgk "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
+	mkdir -p "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
+	cp contrib/packaging/debian/*.rc "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
+	# completions
+	mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions
+	cp contrib/bash_completion "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions/hg
+	mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions
+	cp contrib/zsh_completion "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions/_hg
+	rm "$(CURDIR)"/debian/mercurial-common/usr/bin/hg
--- a/tests/hghave.py	Sat May 12 10:41:08 2018 -0700
+++ b/tests/hghave.py	Sat May 12 17:16:09 2018 -0700
@@ -616,7 +616,7 @@
        "debian build dependencies (run dpkg-checkbuilddeps in contrib/)")
 def has_debdeps():
     # just check exit status (ignoring output)
-    path = '%s/../contrib/debian/control' % os.environ['TESTDIR']
+    path = '%s/../contrib/packaging/debian/control' % os.environ['TESTDIR']
     return matchoutput('dpkg-checkbuilddeps %s' % path, br'')
 
 @check("demandimport", "demandimport enabled")