mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
Merge pull request #85539 from rnhmjoj/breezy
treewide: replace bazaar with breezy
This commit is contained in:
commit
379690ba90
|
@ -400,6 +400,21 @@ systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www" ];
|
|||
The rkt module has been removed, it was archived by upstream.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <link xlink:href="https://bazaar.canonical.com">Bazaar</link> VCS is
|
||||
unmaintained and, as consequence of the Python 2 EOL, the packages
|
||||
<literal>bazaar</literal> and <literal>bazaarTools</literal> were
|
||||
removed. Breezy, the backward compatible fork of Bazaar (see the
|
||||
<link xlink:href="https://www.jelmer.uk/breezy-intro.html">announcement</link>),
|
||||
was packaged as <literal>breezy</literal> and can be used instead.
|
||||
</para>
|
||||
<para>
|
||||
Regarding Nixpkgs, <literal>fetchbzr</literal>,
|
||||
<literal>nix-prefetch-bzr</literal> and Bazaar support in Hydra will
|
||||
continue to work through Breezy.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ let
|
|||
scm_mercurial_command: ${pkgs.mercurial}/bin/hg
|
||||
scm_git_command: ${pkgs.gitAndTools.git}/bin/git
|
||||
scm_cvs_command: ${pkgs.cvs}/bin/cvs
|
||||
scm_bazaar_command: ${pkgs.bazaar}/bin/bzr
|
||||
scm_bazaar_command: ${pkgs.breezy}/bin/bzr
|
||||
scm_darcs_command: ${pkgs.darcs}/bin/darcs
|
||||
|
||||
${cfg.extraConfig}
|
||||
|
@ -297,7 +297,7 @@ in
|
|||
environment.SCHEMA = "${cfg.stateDir}/cache/schema.db";
|
||||
path = with pkgs; [
|
||||
imagemagick
|
||||
bazaar
|
||||
breezy
|
||||
cvs
|
||||
darcs
|
||||
gitAndTools.git
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
, gitSupport ? false, git ? null
|
||||
, docutilsSupport ? false, python ? null, docutils ? null
|
||||
, monotoneSupport ? false, monotone ? null
|
||||
, bazaarSupport ? false, bazaar ? null
|
||||
, bazaarSupport ? false, breezy ? null
|
||||
, cvsSupport ? false, cvs ? null, cvsps ? null
|
||||
, subversionSupport ? false, subversion ? null
|
||||
, mercurialSupport ? false, mercurial ? null
|
||||
|
@ -12,7 +12,7 @@
|
|||
assert docutilsSupport -> (python != null && docutils != null);
|
||||
assert gitSupport -> (git != null);
|
||||
assert monotoneSupport -> (monotone != null);
|
||||
assert bazaarSupport -> (bazaar != null);
|
||||
assert bazaarSupport -> (breezy != null);
|
||||
assert cvsSupport -> (cvs != null && cvsps != null && perlPackages.Filechdir != null);
|
||||
assert subversionSupport -> (subversion != null);
|
||||
assert mercurialSupport -> (mercurial != null);
|
||||
|
@ -39,7 +39,7 @@ stdenv.mkDerivation {
|
|||
++ lib.optionals docutilsSupport [python docutils]
|
||||
++ lib.optionals gitSupport [git]
|
||||
++ lib.optionals monotoneSupport [monotone]
|
||||
++ lib.optionals bazaarSupport [bazaar]
|
||||
++ lib.optionals bazaarSupport [breezy]
|
||||
++ lib.optionals cvsSupport [cvs cvsps perlPackages.Filechdir]
|
||||
++ lib.optionals subversionSupport [subversion]
|
||||
++ lib.optionals mercurialSupport [mercurial];
|
||||
|
@ -64,7 +64,7 @@ stdenv.mkDerivation {
|
|||
wrapProgram $a --suffix PERL5LIB : $PERL5LIB --prefix PATH : ${perlPackages.perl}/bin:$out/bin \
|
||||
${lib.optionalString gitSupport ''--prefix PATH : ${git}/bin \''}
|
||||
${lib.optionalString monotoneSupport ''--prefix PATH : ${monotone}/bin \''}
|
||||
${lib.optionalString bazaarSupport ''--prefix PATH : ${bazaar}/bin \''}
|
||||
${lib.optionalString bazaarSupport ''--prefix PATH : ${breezy}/bin \''}
|
||||
${lib.optionalString cvsSupport ''--prefix PATH : ${cvs}/bin \''}
|
||||
${lib.optionalString cvsSupport ''--prefix PATH : ${cvsps}/bin \''}
|
||||
${lib.optionalString subversionSupport ''--prefix PATH : ${subversion.out}/bin \''}
|
||||
|
|
|
@ -1,149 +0,0 @@
|
|||
diff --git a/bzrlib/tests/test_ssh_transport.py b/bzrlib/tests/test_ssh_transport.py
|
||||
index 9e37c3b..fe9f219 100644
|
||||
--- a/bzrlib/tests/test_ssh_transport.py
|
||||
+++ b/bzrlib/tests/test_ssh_transport.py
|
||||
@@ -22,6 +22,7 @@ from bzrlib.transport.ssh import (
|
||||
SSHCorpSubprocessVendor,
|
||||
LSHSubprocessVendor,
|
||||
SSHVendorManager,
|
||||
+ StrangeHostname,
|
||||
)
|
||||
|
||||
|
||||
@@ -161,6 +162,19 @@ class SSHVendorManagerTests(TestCase):
|
||||
|
||||
class SubprocessVendorsTests(TestCase):
|
||||
|
||||
+ def test_openssh_command_tricked(self):
|
||||
+ vendor = OpenSSHSubprocessVendor()
|
||||
+ self.assertEqual(
|
||||
+ vendor._get_vendor_specific_argv(
|
||||
+ "user", "-oProxyCommand=blah", 100, command=["bzr"]),
|
||||
+ ["ssh", "-oForwardX11=no", "-oForwardAgent=no",
|
||||
+ "-oClearAllForwardings=yes",
|
||||
+ "-oNoHostAuthenticationForLocalhost=yes",
|
||||
+ "-p", "100",
|
||||
+ "-l", "user",
|
||||
+ "--",
|
||||
+ "-oProxyCommand=blah", "bzr"])
|
||||
+
|
||||
def test_openssh_command_arguments(self):
|
||||
vendor = OpenSSHSubprocessVendor()
|
||||
self.assertEqual(
|
||||
@@ -171,6 +185,7 @@ class SubprocessVendorsTests(TestCase):
|
||||
"-oNoHostAuthenticationForLocalhost=yes",
|
||||
"-p", "100",
|
||||
"-l", "user",
|
||||
+ "--",
|
||||
"host", "bzr"]
|
||||
)
|
||||
|
||||
@@ -184,9 +199,16 @@ class SubprocessVendorsTests(TestCase):
|
||||
"-oNoHostAuthenticationForLocalhost=yes",
|
||||
"-p", "100",
|
||||
"-l", "user",
|
||||
- "-s", "host", "sftp"]
|
||||
+ "-s", "--", "host", "sftp"]
|
||||
)
|
||||
|
||||
+ def test_openssh_command_tricked(self):
|
||||
+ vendor = SSHCorpSubprocessVendor()
|
||||
+ self.assertRaises(
|
||||
+ StrangeHostname,
|
||||
+ vendor._get_vendor_specific_argv,
|
||||
+ "user", "-oProxyCommand=host", 100, command=["bzr"])
|
||||
+
|
||||
def test_sshcorp_command_arguments(self):
|
||||
vendor = SSHCorpSubprocessVendor()
|
||||
self.assertEqual(
|
||||
@@ -209,6 +231,13 @@ class SubprocessVendorsTests(TestCase):
|
||||
"-s", "sftp", "host"]
|
||||
)
|
||||
|
||||
+ def test_lsh_command_tricked(self):
|
||||
+ vendor = LSHSubprocessVendor()
|
||||
+ self.assertRaises(
|
||||
+ StrangeHostname,
|
||||
+ vendor._get_vendor_specific_argv,
|
||||
+ "user", "-oProxyCommand=host", 100, command=["bzr"])
|
||||
+
|
||||
def test_lsh_command_arguments(self):
|
||||
vendor = LSHSubprocessVendor()
|
||||
self.assertEqual(
|
||||
@@ -231,6 +260,13 @@ class SubprocessVendorsTests(TestCase):
|
||||
"--subsystem", "sftp", "host"]
|
||||
)
|
||||
|
||||
+ def test_plink_command_tricked(self):
|
||||
+ vendor = PLinkSubprocessVendor()
|
||||
+ self.assertRaises(
|
||||
+ StrangeHostname,
|
||||
+ vendor._get_vendor_specific_argv,
|
||||
+ "user", "-oProxyCommand=host", 100, command=["bzr"])
|
||||
+
|
||||
def test_plink_command_arguments(self):
|
||||
vendor = PLinkSubprocessVendor()
|
||||
self.assertEqual(
|
||||
diff --git a/bzrlib/transport/ssh.py b/bzrlib/transport/ssh.py
|
||||
index eecaa26..6f22341 100644
|
||||
--- a/bzrlib/transport/ssh.py
|
||||
+++ b/bzrlib/transport/ssh.py
|
||||
@@ -46,6 +46,10 @@ else:
|
||||
from paramiko.sftp_client import SFTPClient
|
||||
|
||||
|
||||
+class StrangeHostname(errors.BzrError):
|
||||
+ _fmt = "Refusing to connect to strange SSH hostname %(hostname)s"
|
||||
+
|
||||
+
|
||||
SYSTEM_HOSTKEYS = {}
|
||||
BZR_HOSTKEYS = {}
|
||||
|
||||
@@ -360,6 +364,11 @@ class SubprocessVendor(SSHVendor):
|
||||
# tests, but beware of using PIPE which may hang due to not being read.
|
||||
_stderr_target = None
|
||||
|
||||
+ @staticmethod
|
||||
+ def _check_hostname(arg):
|
||||
+ if arg.startswith('-'):
|
||||
+ raise StrangeHostname(hostname=arg)
|
||||
+
|
||||
def _connect(self, argv):
|
||||
# Attempt to make a socketpair to use as stdin/stdout for the SSH
|
||||
# subprocess. We prefer sockets to pipes because they support
|
||||
@@ -424,9 +433,9 @@ class OpenSSHSubprocessVendor(SubprocessVendor):
|
||||
if username is not None:
|
||||
args.extend(['-l', username])
|
||||
if subsystem is not None:
|
||||
- args.extend(['-s', host, subsystem])
|
||||
+ args.extend(['-s', '--', host, subsystem])
|
||||
else:
|
||||
- args.extend([host] + command)
|
||||
+ args.extend(['--', host] + command)
|
||||
return args
|
||||
|
||||
register_ssh_vendor('openssh', OpenSSHSubprocessVendor())
|
||||
@@ -439,6 +448,7 @@ class SSHCorpSubprocessVendor(SubprocessVendor):
|
||||
|
||||
def _get_vendor_specific_argv(self, username, host, port, subsystem=None,
|
||||
command=None):
|
||||
+ self._check_hostname(host)
|
||||
args = [self.executable_path, '-x']
|
||||
if port is not None:
|
||||
args.extend(['-p', str(port)])
|
||||
@@ -460,6 +470,7 @@ class LSHSubprocessVendor(SubprocessVendor):
|
||||
|
||||
def _get_vendor_specific_argv(self, username, host, port, subsystem=None,
|
||||
command=None):
|
||||
+ self._check_hostname(host)
|
||||
args = [self.executable_path]
|
||||
if port is not None:
|
||||
args.extend(['-p', str(port)])
|
||||
@@ -481,6 +492,7 @@ class PLinkSubprocessVendor(SubprocessVendor):
|
||||
|
||||
def _get_vendor_specific_argv(self, username, host, port, subsystem=None,
|
||||
command=None):
|
||||
+ self._check_hostname(host)
|
||||
args = [self.executable_path, '-x', '-a', '-ssh', '-2', '-batch']
|
||||
if port is not None:
|
||||
args.extend(['-P', str(port)])
|
|
@ -1,11 +0,0 @@
|
|||
diff -ru orig/bzrlib/transport/http/_urllib2_wrappers.py bzr-2.7.0/bzrlib/transport/http/_urllib2_wrappers.py
|
||||
--- orig/bzr-2.7.0/bzrlib/transport/http/_urllib2_wrappers.py 2016-02-01 20:49:17.000000000 +0100
|
||||
+++ bzr-2.7.0/bzrlib/transport/http/_urllib2_wrappers.py 2016-06-18 23:15:21.089511349 +0200
|
||||
@@ -95,6 +95,7 @@
|
||||
u"/usr/local/share/certs/ca-root-nss.crt", # FreeBSD
|
||||
# XXX: Needs checking, can't trust the interweb ;) -- vila 2012-01-25
|
||||
u'/etc/openssl/certs/ca-certificates.crt', # Solaris
|
||||
+ u'@certPath@',
|
||||
]
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
{ stdenv, fetchurl, python2Packages
|
||||
, withSFTP ? true
|
||||
}:
|
||||
|
||||
python2Packages.buildPythonApplication rec {
|
||||
version = "2.7";
|
||||
release = ".0";
|
||||
name = "bazaar-${version}${release}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://launchpad.net/bzr/${version}/${version}${release}/+download/bzr-${version}${release}.tar.gz";
|
||||
sha256 = "1cysix5k3wa6y7jjck3ckq3abls4gvz570s0v0hxv805nwki4i8d";
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = []
|
||||
++ stdenv.lib.optionals withSFTP [ python2Packages.paramiko ];
|
||||
|
||||
patches = [
|
||||
# Bazaar can't find the certificates alone
|
||||
./add_certificates.patch
|
||||
./CVE-2017-14176.patch
|
||||
];
|
||||
postPatch = ''
|
||||
substituteInPlace bzrlib/transport/http/_urllib2_wrappers.py \
|
||||
--subst-var-by certPath /etc/ssl/certs/ca-certificates.crt
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "http://bazaar-vcs.org/";
|
||||
description = "A distributed version control system that Just Works";
|
||||
platforms = platforms.unix;
|
||||
license = licenses.gpl2Plus;
|
||||
};
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{ stdenv, fetchurl, python2Packages }:
|
||||
|
||||
python2Packages.buildPythonApplication rec {
|
||||
pname = "bzr-tools";
|
||||
version = "2.6.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://launchpad.net/bzrtools/stable/${version}/+download/bzrtools-${version}.tar.gz";
|
||||
sha256 = "0n3zzc6jf5866kfhmrnya1vdr2ja137a45qrzsz8vz6sc6xgn5wb";
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Bazaar plugins";
|
||||
homepage = "http://wiki.bazaar.canonical.com/BzrTools";
|
||||
platforms = platforms.unix;
|
||||
license = licenses.gpl2;
|
||||
};
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, fetchurl, makeWrapper
|
||||
, python2Packages
|
||||
, cvs, subversion, git, bazaar
|
||||
, cvs, subversion, git, breezy
|
||||
}:
|
||||
|
||||
python2Packages.buildPythonApplication rec {
|
||||
|
@ -14,7 +14,7 @@ python2Packages.buildPythonApplication rec {
|
|||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
checkInputs = [ subversion git bazaar ];
|
||||
checkInputs = [ subversion git breezy ];
|
||||
|
||||
checkPhase = "python run-tests.py";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, fetchurl, makeWrapper, python27Packages, git
|
||||
, docbook_xml_dtd_412, docbook_xsl, asciidoc, xmlto, pypy
|
||||
, bazaar ? null, cvs ? null, darcs ? null, fossil ? null
|
||||
, breezy ? null, cvs ? null, darcs ? null, fossil ? null
|
||||
, mercurial ? null, monotone ? null, rcs ? null
|
||||
, subversion ? null, cvs_fast_export ? null }:
|
||||
|
||||
|
@ -42,7 +42,7 @@ in mkDerivation rec {
|
|||
let
|
||||
binpath = makeBinPath (
|
||||
filter (x: x != null)
|
||||
[ out git bazaar cvs darcs fossil mercurial
|
||||
[ out git breezy cvs darcs fossil mercurial
|
||||
monotone rcs src subversion cvs_fast_export ]
|
||||
);
|
||||
pythonpath = makeSearchPathOutput "lib" python.sitePackages (
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ stdenvNoCC, bazaar }:
|
||||
{ stdenvNoCC, breezy }:
|
||||
{ url, rev, sha256 }:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "bzr-export";
|
||||
|
||||
builder = ./builder.sh;
|
||||
nativeBuildInputs = [ bazaar ];
|
||||
nativeBuildInputs = [ breezy ];
|
||||
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
, xmlto
|
||||
|
||||
, acl
|
||||
, bazaar
|
||||
, breezy
|
||||
, binutils
|
||||
, bzip2
|
||||
, coreutils
|
||||
|
@ -89,7 +89,7 @@ in stdenv.mkDerivation rec {
|
|||
./respect-xml-catalog-files-var.patch
|
||||
(substituteAll {
|
||||
src = ./fix-paths.patch;
|
||||
bzr = "${bazaar}/bin/bzr";
|
||||
bzr = "${breezy}/bin/bzr";
|
||||
cp = "${coreutils}/bin/cp";
|
||||
patch = "${patch}/bin/patch";
|
||||
tar = "${gnutar}/bin/tar";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, nix, perlPackages, buildEnv, fetchFromGitHub
|
||||
, makeWrapper, autoconf, automake, libtool, unzip, pkgconfig, sqlite, libpqxx
|
||||
, gitAndTools, mercurial, darcs, subversion, bazaar, openssl, bzip2, libxslt
|
||||
, gitAndTools, mercurial, darcs, subversion, breezy, openssl, bzip2, libxslt
|
||||
, guile, perl, postgresql, nukeReferences, git, boehmgc, nlohmann_json
|
||||
, docbook_xsl, openssh, gnused, coreutils, findutils, gzip, lzma, gnutar
|
||||
, rpm, dpkg, cdrkit, pixz, lib, boost, autoreconfHook, src ? null, version ? null
|
||||
|
@ -79,7 +79,7 @@ in stdenv.mkDerivation rec {
|
|||
|
||||
buildInputs =
|
||||
[ makeWrapper autoconf automake libtool unzip nukeReferences sqlite libpqxx
|
||||
gitAndTools.top-git mercurial /*darcs*/ subversion bazaar openssl bzip2 libxslt
|
||||
gitAndTools.top-git mercurial /*darcs*/ subversion breezy openssl bzip2 libxslt
|
||||
perlDeps perl nix
|
||||
postgresql # for running the tests
|
||||
nlohmann_json
|
||||
|
@ -88,7 +88,7 @@ in stdenv.mkDerivation rec {
|
|||
|
||||
hydraPath = lib.makeBinPath (
|
||||
[ sqlite subversion openssh nix coreutils findutils pixz
|
||||
gzip bzip2 lzma gnutar unzip git gitAndTools.top-git mercurial /*darcs*/ gnused bazaar
|
||||
gzip bzip2 lzma gnutar unzip git gitAndTools.top-git mercurial /*darcs*/ gnused breezy
|
||||
] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ] );
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ stdenv, python3Packages
|
||||
, git, bazaar, subversion }:
|
||||
, git, breezy, subversion }:
|
||||
|
||||
with python3Packages;
|
||||
|
||||
|
@ -14,7 +14,7 @@ buildPythonApplication rec {
|
|||
|
||||
propagatedBuildInputs = [ pyyaml setuptools ];
|
||||
|
||||
makeWrapperArgs = ["--prefix" "PATH" ":" (stdenv.lib.makeBinPath [ git bazaar subversion ])];
|
||||
makeWrapperArgs = ["--prefix" "PATH" ":" (stdenv.lib.makeBinPath [ git breezy subversion ])];
|
||||
|
||||
doCheck = false; # requires network
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ stdenv, makeWrapper, buildEnv,
|
||||
bazaar, coreutils, cvs, findutils, gawk, git, gnused, mercurial, nix, subversion
|
||||
breezy, coreutils, cvs, findutils, gawk, git, gnused, mercurial, nix, subversion
|
||||
}:
|
||||
|
||||
let mkPrefetchScript = tool: src: deps:
|
||||
|
@ -26,7 +26,7 @@ let mkPrefetchScript = tool: src: deps:
|
|||
};
|
||||
};
|
||||
in rec {
|
||||
nix-prefetch-bzr = mkPrefetchScript "bzr" ../../../build-support/fetchbzr/nix-prefetch-bzr [ bazaar ];
|
||||
nix-prefetch-bzr = mkPrefetchScript "bzr" ../../../build-support/fetchbzr/nix-prefetch-bzr [ breezy ];
|
||||
nix-prefetch-cvs = mkPrefetchScript "cvs" ../../../build-support/fetchcvs/nix-prefetch-cvs [ cvs ];
|
||||
nix-prefetch-git = mkPrefetchScript "git" ../../../build-support/fetchgit/nix-prefetch-git [ coreutils findutils gawk git ];
|
||||
nix-prefetch-hg = mkPrefetchScript "hg" ../../../build-support/fetchhg/nix-prefetch-hg [ mercurial ];
|
||||
|
|
|
@ -50,6 +50,8 @@ mapAliases ({
|
|||
bar-xft = lemonbar-xft; # added 2015-01-16
|
||||
bashCompletion = bash-completion; # Added 2016-09-28
|
||||
batti = throw "batti has been removed from nixpkgs, as it was unmaintained"; # added 2019-12-10
|
||||
bazaar = throw "bazaar has been deprecated by breezy."; # added 2020-04-19
|
||||
bazaarTools = throw "bazaar has been deprecated by breezy."; # added 2020-04-19
|
||||
beegfs = throw "beegfs has been removed."; # added 2019-11-24
|
||||
bluezFull = bluez; # Added 2019-12-03
|
||||
bridge_utils = bridge-utils; # added 2015-02-20
|
||||
|
|
|
@ -18735,11 +18735,6 @@ in
|
|||
|
||||
baudline = callPackage ../applications/audio/baudline { };
|
||||
|
||||
|
||||
bazaar = callPackage ../applications/version-management/bazaar { };
|
||||
|
||||
bazaarTools = callPackage ../applications/version-management/bazaar/tools.nix { };
|
||||
|
||||
bb = callPackage ../applications/misc/bb { };
|
||||
|
||||
berry = callPackage ../applications/window-managers/berry { };
|
||||
|
|
Loading…
Reference in a new issue