Travis在Custom Source Repo中找不到Debian软件包,为什么?

时间:2017-06-28 15:37:43

标签: ubuntu debian travis-ci

此处的说明似乎是合乎逻辑的,我已尝试过,并且未启用docker:

  

https://docs.travis-ci.com/user/installing-dependencies/

这是日志:

Adding APT Sources (BETA)
$ export DEBIAN_FRONTEND=noninteractive
0.01s$ echo "deb https://dl.bintray.com/solvingj/public-deb unstable main" | sudo tee -a /etc/apt/sources.list > /dev/null
Installing APT Packages (BETA)
$ export DEBIAN_FRONTEND=noninteractive
3.03s$ sudo -E apt-get -yq update &>> ~/apt-get-update.log
0.30s$ sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install cmake go-bin-deb
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package go-bin-deb
apt-get.diagnostics
apt-get install failed
$ cat ~/apt-get-update.log
Ign:1 http://us-central1.gce.archive.ubuntu.com/ubuntu precise InRelease
Hit:2 http://us-central1.gce.archive.ubuntu.com/ubuntu precise-updates InRelease
Hit:3 http://us-central1.gce.archive.ubuntu.com/ubuntu precise-backports InRelease
Hit:4 http://us-central1.gce.archive.ubuntu.com/ubuntu precise Release
Ign:5 http://downloads-distro.mongodb.org/repo/debian-sysvinit dist InRelease
Get:6 http://downloads-distro.mongodb.org/repo/debian-sysvinit dist Release [2,040 B]
Get:7 http://downloads-distro.mongodb.org/repo/debian-sysvinit dist Release.gpg [490 B]
Hit:8 http://security.ubuntu.com/ubuntu precise-security InRelease
Hit:9 http://apt.postgresql.org/pub/repos/apt precise-pgdg InRelease
Hit:11 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu precise InRelease
Get:12 http://downloads-distro.mongodb.org/repo/debian-sysvinit dist/10gen amd64 Packages [30.9 kB]
Ign:13 http://ppa.launchpad.net/couchdb/stable/ubuntu precise InRelease
Ign:14 http://ppa.launchpad.net/git-core/v1.8/ubuntu precise InRelease
Get:15 http://downloads-distro.mongodb.org/repo/debian-sysvinit dist/10gen i386 Packages [30.5 kB]
Hit:16 http://ppa.launchpad.net/pollinate/ppa/ubuntu precise InRelease
Ign:17 https://dl.bintray.com/solvingj/public-deb unstable InRelease
Hit:18 http://ppa.launchpad.net/travis-ci/zero-mq/ubuntu precise InRelease
Hit:19 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu precise InRelease
Hit:20 http://ppa.launchpad.net/webupd8team/java/ubuntu precise InRelease
Hit:21 https://packagecloud.io/basho/riak/ubuntu precise InRelease
Hit:22 http://ppa.launchpad.net/couchdb/stable/ubuntu precise Release
Hit:24 https://packagecloud.io/computology/apt-backport/ubuntu precise InRelease
Hit:25 http://ppa.launchpad.net/git-core/v1.8/ubuntu precise Release
Get:27 https://dl.bintray.com/solvingj/public-deb unstable Release [2,673 B]
Ign:28 https://dl.bintray.com/solvingj/public-deb unstable Release.gpg
Get:29 https://dl.bintray.com/solvingj/public-deb unstable/main amd64 Packages [14 B]
Get:30 https://dl.bintray.com/solvingj/public-deb unstable/main i386 Packages [14 B]
Fetched 66.7 kB in 1s (38.0 kB/s)
Reading package lists...
W: http://us-central1.gce.archive.ubuntu.com/ubuntu/dists/precise-updates/InRelease: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
W: http://us-central1.gce.archive.ubuntu.com/ubuntu/dists/precise-backports/InRelease: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
W: http://us-central1.gce.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
W: http://downloads-distro.mongodb.org/repo/debian-sysvinit/dists/dist/Release.gpg: Signature by key 492EAFE8CD016A07919F1D2B9ECBEC467F0CEB10 uses weak digest algorithm (SHA1)
W: http://security.ubuntu.com/ubuntu/dists/precise-security/InRelease: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
W: http://ppa.launchpad.net/couchdb/stable/ubuntu/dists/precise/Release.gpg: Signature by key 15866BAFD9BCC4F3C1E0DFC7D69548E1C17EAB57 uses weak digest algorithm (SHA1)
W: http://ppa.launchpad.net/git-core/v1.8/ubuntu/dists/precise/Release.gpg: Signature by key E1DD270288B4E6030699E45FA1715D88E1DF1F24 uses weak digest algorithm (SHA1)
W: The repository 'https://dl.bintray.com/solvingj/public-deb unstable Release' is not signed.
The command "sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install cmake go-bin-deb" failed and exited with 100 during .

这是我的travis.yml文件的开头:

sudo: required
language: cpp
compiler:
- gcc
os:
- linux
addons:
  apt:
    sources:
    - sourceline: deb https://dl.bintray.com/solvingj/public-deb unstable main
    packages:
    - cmake
    - go-bin-deb

您可以访问自定义仓库,将其添加到debian机器,然后找到包裹没有问题:

  

https://bintray.com/solvingj/public-deb

root@debian:/home/myprofile/go-github-release-test# apt-get clean
root@debian:/home/myprofile/go-github-release-test# more /etc/apt/sources.list
deb https://dl.bintray.com/solvingj/public-deb unstable main

root@debian:/home/myprofile/go-github-release-test# apt-get install go-bin-deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  go-bin-deb
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,074 kB of archives.
After this operation, 3,072 B of additional disk space will be used.
Get:1 https://mh-cbon.github.io/go-bin-deb/apt/public/ all/contrib go-bin-deb i386 0.0.18 [1,074 kB]
Fetched 1,074 kB in 1s (865 kB/s)
Selecting previously unselected package go-bin-deb.
(Reading database ... 36957 files and directories currently installed.)
Preparing to unpack .../go-bin-deb_0.0.18_i386.deb ...
Unpacking go-bin-deb (0.0.18) ...
Setting up go-bin-deb (0.0.18) ...
root@debian:/home/myprofile/go-github-release-test#

2 个答案:

答案 0 :(得分:0)

问题是存储库只包含32位版本的软件包。我成功的测试是在32位操作系统上。我的失败测试是在Travis和Linux子系统Linux上,两者都是64位。一旦我将64位构建上传到debian存储库,它就找到了包。

答案 1 :(得分:-1)

嗯,警告很清楚:

<!doctype html>
<html>
<head>
<title>test</title>
<meta charset="UTF-8">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
$(document).ready(function() {
    $("#myButton").on('click', function() {
          $("<h1>Hello</h1><input id=\"but\" type=\"button\">Click").appendTo("#main_body"); 
    });
    $( "#but" ).on( "click", function() {
        alert( "bla bla" );
    });    
});   
</script> 
</head>

<body id="main_body"> 
    <input type="button" value="Tıkla" id="myButton" />
</body>
</html>

W: The repository 'https://dl.bintray.com/solvingj/public-deb unstable Release' is not signed. 对每个软件包进行gpg验证,以便让攻击者 hard 以恶意版本替换软件包。

因此,您应该签署存储库,因此apt可以验证包的真实性。

不安全,危险且通常不好的选择是添加apt标志:

--allow-unauthenticated

不要使用它。你被警告了! 而是在您的存储库中签名。