本地构建 osc build openSUSE_Tumblewwed x86_64 报错有个 rpm 包文件大小不匹配

报错 Content-Length is not matching file size for http://download.opensuse.org/tumbleweed/repo/oss//x86_64/gcc12-12.2.1+git416-1.1.x86_64.rpm: 34370201 vs 1310720 file size ,最后没提示构建成功,也没有 build.log 日志看,求大佬帮忙

下载依赖时报的?
重试过了么

是的,重试过了,还是报错,搜不到解决方案,大佬知道怎么办吗

挂上代理试下?

挂梯子?我试试

还是不行大佬

上点日志啥的吧,这个问题看起来就是网络问题,你确定后续重试的时候有使用代理么?

或者,手动下载这个包(应该有三十多兆)放到包缓存目录
当前在我的环境这包看起来是在
/var/tmp/osbuild-packagecache/openSUSE:Factory/standard/x86_64/
你可以自己看下你自己的(

osc log 没有显示构建的日志,在目录下也没有 build log,我在 Windows 下用了梯子,虚拟机共用不了吗?

好的,我试试,谢谢大佬

sky@localhost:~/home:mashitian/obs-package> osc build openSUSE_Tumbleweed x86_64
Building my-first-obs-package.spec for openSUSE_Tumbleweed/x86_64
Getting buildconfig from server and store to /home/sky/home:mashitian/obs-package/.osc/_buildconfig-openSUSE_Tumbleweed-x86_64
Getting buildinfo from server and store to /home/sky/home:mashitian/obs-package/.osc/_buildinfo-openSUSE_Tumbleweed-x86_64.xml
Updating cache of required packages
100.0% cache miss. 0/175 dependencies cached.

[1/175] (openSUSE:Tumbleweed) liblua5_4-5-5.4.4-6.1.x86_64.rpm: 100%|##########################| Time: 0:00:00
[2/175] (openSUSE:Tumbleweed) aaa_base-84.87+git20220822.6b9f7a3-1.1.x86_64.rpm: 100%|#########| Time: 0:00:00
[3/175] (openSUSE:Tumbleweed) filesystem-84.87-8.1.x86_64.rpm: 100%|###########################| Time: 0:00:00
[4/175] (openSUSE:Tumbleweed) attr-2.5.1-1.23.x86_64.rpm: 100%|################################| Time: 0:00:00
[5/175] (openSUSE:Tumbleweed) bash-5.1.16-8.3.x86_64.rpm: 100%|################################| Time: 0:00:00
[6/175] (openSUSE:Tumbleweed) bash-sh-5.1.16-8.3.x86_64.rpm: 100%|#############################| Time: 0:00:00
[7/175] (openSUSE:Tumbleweed) coreutils-9.1-4.2.x86_64.rpm: 100%|##############################| Time: 0:00:00
[8/175] (openSUSE:Tumbleweed) diffutils-3.8-2.11.x86_64.rpm: 100%|#############################| Time: 0:00:00
[9/175] (openSUSE:Tumbleweed) fillup-1.42-278.1.x86_64.rpm: 100%|##############################| Time: 0:00:00
[10/175] (openSUSE:Tumbleweed) glibc-2.36-3.1.x86_64.rpm: 100%|################################| Time: 0:00:00
[11/175] (openSUSE:Tumbleweed) grep-3.7-5.2.x86_64.rpm: 100%|##################################| Time: 0:00:00
[12/175] (openSUSE:Tumbleweed) pam-1.5.2-7.3.x86_64.rpm: 100%|#################################| Time: 0:00:00
[13/175] (openSUSE:Tumbleweed) permissions-1599_20220713-31.3.x86_64.rpm: 100%|################| Time: 0:00:00
[14/175] (openSUSE:Tumbleweed) rpm-4.17.1-1.3.x86_64.rpm: 100%|################################| Time: 0:00:00
[15/175] (openSUSE:Tumbleweed) rpm-config-SUSE-20220421-1.3.noarch.rpm: 100%|##################| Time: 0:00:00
[16/175] (openSUSE:Tumbleweed) sed-4.8-3.13.x86_64.rpm: 100%|##################################| Time: 0:00:00
[17/175] (openSUSE:Tumbleweed) tar-1.34-7.2.x86_64.rpm: 100%|##################################| Time: 0:00:00
[18/175] (openSUSE:Tumbleweed) libbz2-1-1.0.8-4.7.x86_64.rpm: 100%|############################| Time: 0:00:00
[19/175] (openSUSE:Tumbleweed) libgcc_s1-12.2.1+git416-1.1.x86_64.rpm: 100%|###################| Time: 0:00:00
[20/175] (openSUSE:Tumbleweed) libncurses6-6.3.20220820-27.1.x86_64.rpm: 100%|#################| Time: 0:00:00
[21/175] (openSUSE:Tumbleweed) libreadline8-8.1-3.9.x86_64.rpm: 100%|##########################| Time: 0:00:00
[22/175] (openSUSE:Tumbleweed) libz1-1.2.12-1.1.x86_64.rpm: 100%|##############################| Time: 0:00:00
[23/175] (openSUSE:Tumbleweed) libselinux1-3.4-2.3.x86_64.rpm: 100%|###########################| Time: 0:00:00
[24/175] (openSUSE:Tumbleweed) libgcrypt20-1.9.4-5.1.x86_64.rpm: 100%|#########################| Time: 0:00:00
[25/175] (openSUSE:Tumbleweed) libgpg-error0-1.45-1.7.x86_64.rpm: 100%|########################| Time: 0:00:00
[26/175] (openSUSE:Tumbleweed) liblzma5-5.2.6-1.3.x86_64.rpm: 100%|############################| Time: 0:00:00
[27/175] (openSUSE:Tumbleweed) libcap2-2.65-1.3.x86_64.rpm: 100%|##############################| Time: 0:00:00
[28/175] (openSUSE:Tumbleweed) libacl1-2.3.1-2.7.x86_64.rpm: 100%|#############################| Time: 0:00:00
[29/175] (openSUSE:Tumbleweed) libattr1-2.5.1-1.23.x86_64.rpm: 100%|###########################| Time: 0:00:00
[30/175] (openSUSE:Tumbleweed) libpopt0-1.18-3.3.x86_64.rpm: 100%|#############################| Time: 0:00:00
[31/175] (openSUSE:Tumbleweed) libelf1-0.187-5.3.x86_64.rpm: 100%|#############################| Time: 0:00:00
[32/175] (openSUSE:Tumbleweed) libpcre1-8.45-2.3.x86_64.rpm: 100%|#############################| Time: 0:00:00
[33/175] (openSUSE:Tumbleweed) libzstd1-1.5.2-1.9.x86_64.rpm: 100%|############################| Time: 0:00:00
[34/175] (openSUSE:Tumbleweed) libpcre2-8-0-10.40-3.3.x86_64.rpm: 100%|########################| Time: 0:00:00
[35/175] (openSUSE:Tumbleweed) util-linux-2.37.4-4.3.x86_64.rpm: 100%|#########################| Time: 0:00:00
[36/175] (openSUSE:Tumbleweed) libmount1-2.37.4-4.3.x86_64.rpm: 100%|##########################| Time: 0:00:00
[37/175] (openSUSE:Tumbleweed) perl-base-5.36.0-3.3.x86_64.rpm: 100%|##########################| Time: 0:00:00
[38/175] (openSUSE:Tumbleweed) libdb-4_8-4.8.30-39.7.x86_64.rpm: 100%|#########################| Time: 0:00:00
[39/175] (openSUSE:Tumbleweed) libblkid1-2.37.4-4.3.x86_64.rpm: 100%|##########################| Time: 0:00:00
[40/175] (openSUSE:Tumbleweed) libuuid1-2.37.4-4.3.x86_64.rpm: 100%|###########################| Time: 0:00:00
[41/175] (openSUSE:Tumbleweed) libsmartcols1-2.37.4-4.3.x86_64.rpm: 100%|######################| Time: 0:00:00
[42/175] (openSUSE:Tumbleweed) libcrypt1-4.4.27-1.10.x86_64.rpm: 100%|#########################| Time: 0:00:00
[43/175] (openSUSE:Tumbleweed) kernel-obs-build-5.19.7-1.1.x86_64.rpm: 100%|###################| Time: 0:00:00
[44/175] (openSUSE:Tumbleweed) gcc-12-2.4.x86_64.rpm: 100%|####################################| Time: 0:00:00
[45/175] (openSUSE:Tumbleweed) cmake-3.24.1-2.1.x86_64.rpm: 100%|##############################| Time: 0:00:00
[46/175] (openSUSE:Tumbleweed) rpm-build-4.17.1-1.3.x86_64.rpm: 100%|##########################| Time: 0:00:00
[47/175] (openSUSE:Tumbleweed) gcc-PIE-12-2.4.x86_64.rpm: 100%|################################| Time: 0:00:00
[48/175] (openSUSE:Tumbleweed) gcc12-12.2.1+git416-1.1.x86_64.rpm: 100%|#######################| Time: 0:00:01
Content-Length is not matching file size for http://download.opensuse.org/tumbleweed/repo/oss//x86_64/gcc12-12.2.1+git416-1.1.x86_64.rpm: 34370201 vs 2097152 file size
sky@localhost:~/home:mashitian/obs-package>

包都下载成功了,谢谢大佬!
但是后面报错了点东西
12s] error: File not found: /home/abuild/rpmbuild/BUILDROOT/my-first-obs-package-0.1.0-0.x86_64/usr/share/doc/packages/my-first-obs-package/README
[ 12s]
[ 12s] RPM build errors:
[ 12s] File not found: /home/abuild/rpmbuild/BUILDROOT/my-first-obs-package-0.1.0-0.x86_64/usr/bin/*
[ 12s] File not found: /home/abuild/rpmbuild/BUILDROOT/my-first-obs-package-0.1.0-0.x86_64/usr/share/doc/packages/my-first-obs-package/README
[ 12s]
[ 12s] localhost.localdomain failed “build my-first-obs-package.spec” at Sun Sep 11 10:17:31 UTC 2022.
[ 12s]

The buildroot was: /var/tmp/build-root/openSUSE_Tumbleweed-x86_64
sky@localhost:~/home:mashitian/obs-package>

但是 build-root 目录已经生成,这算不算成功了大佬?

成功了,这个检查下你的 .spec 吧

Name: my-first-obs-package
Version: 0.1.0
Release: 0
Summary: Frobnication Tool

License: GPL-3.0

Group: Documentation
Url: https://github.com/obs-example/my-first-obs-package
Source: my-first-obs-package-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: cmake
BuildRoot: %{_tmppath}/%{name}-%{version}-build

%description
This tool frobnicates the bar with the foo when choosing the baz.

%prep
%setup -q -n %{name}-%{version}

%build

%install

%files
%defattr(-,root,root,-)
%doc README LICENSE .txt
%{_bindir}/

%changelog

我都按照 obs 官网的用户指南敲的,不知道哪里出错了