rpmbuild 找不到文件
rpmbuild unable to find files
我创建的规范文件有问题,无法在 tar.gz 文件中找到文件。我在这里转储了规范文件的内容。 tar.gz 文件在 ~/rpmbuild/SOURCES 中。我也会把 tar 列表放在下面。
Name: pyvaders
Version: 1
Release: 1%{?dist}
Summary: Space Invaders is a classic arcade game from the 1980s. PyInvaders is an implementation of this in python.
License: MIT
URL: https://github.com/nixbytes/pyvaders
Source0: pyvaders-1.1.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{release}-buildroot
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
%description
Space Invaders is a classic arcade game from the 1980s. PyInvaders is an implementation of this in python
Requires: python3-pygame
%prep
#mkdir -p $RPM_BUILD_ROOT/usr/local/bin/pyvaders
%build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
cp -aR pyvaders-1/ $RPM_BUILD_ROOT
#mv pyvaders-1.1/* $RPM_BUILD_ROOT
%check
%files
%attr(0744, root, root)
/usr/local/bin/pyvaders/assets/alien_enemy.png
/usr/local/bin/pyvaders/assets/alien.png
/usr/local/bin/pyvaders/assets/darkgrey_02.png
/usr/local/bin/pyvaders/assets/explosion.wav
/usr/local/bin/pyvaders/assets/laser.png
/usr/local/bin/pyvaders/assets/laser.wav
/usr/local/bin/pyvaders/assets/Monoton-Regular.ttf
/usr/local/bin/pyvaders/assets/Monotro-License
/usr/local/bin/pyvaders/assets/mountains03-1920-x-1080_full.png
/usr/local/bin/pyvaders/assets/mountains03-512-x-256_full.png
/usr/local/bin/pyvaders/assets/space-bg.jpg
/usr/local/bin/pyvaders/__init__.py
/usr/local/bin/pyvaders/main.py
这是 tar 文件的输出
tar -tvf pyvaders-1.1.tar.gz
drwxr-xr-x z/z 0 2020-12-03 20:43 usr/
drwxr-xr-x z/z 0 2020-12-03 20:43 usr/local/
drwxr-xr-x z/z 0 2020-12-03 20:43 usr/local/bin/
drwxr-xr-x z/z 0 2020-12-03 20:43 usr/local/bin/pyvaders/
-rw-r--r-- z/z 0 2020-12-03 20:43 usr/local/bin/pyvaders/__init__.py
-rwxr-xr-x z/z 4881 2020-12-03 20:43 usr/local/bin/pyvaders/main.py
drwxr-xr-x z/z 0 2020-12-03 20:43 usr/local/bin/pyvaders/assests/
-rwxr-xr-x z/z 51604 2020-12-03 20:43 usr/local/bin/pyvaders/assests/Monoton-Regular.ttf
-rw-r--r-- z/z 4527 2020-12-03 20:43 usr/local/bin/pyvaders/assests/Monotro-License
-rw-r--r-- z/z 1847 2020-12-03 20:43 usr/local/bin/pyvaders/assests/alien.png
-rw-r--r-- z/z 10015 2020-12-03 20:43 usr/local/bin/pyvaders/assests/alien_enemy.png
-rw-r--r-- z/z 7587 2020-12-03 20:43 usr/local/bin/pyvaders/assests/darkgrey_02.png
-rw-r--r-- z/z 336406 2020-12-03 20:43 usr/local/bin/pyvaders/assests/explosion.wav
-rw-r--r-- z/z 3086 2020-12-03 20:43 usr/local/bin/pyvaders/assests/laser.png
-rw-r--r-- z/z 34252 2020-12-03 20:43 usr/local/bin/pyvaders/assests/laser.wav
-rw-r--r-- z/z 142152 2020-12-03 20:43 usr/local/bin/pyvaders/assests/mountains03-1920-x-1080_full.png
-rw-r--r-- z/z 41767 2020-12-03 20:43 usr/local/bin/pyvaders/assests/mountains03-512-x-256_full.png
-rw-r--r-- z/z 373464 2020-12-03 20:43 usr/local/bin/pyvaders/assests/space-bg.jpg
这是错误信息
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/alien_enemy.png
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/alien.png
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/darkgrey_02.png
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/explosion.wav
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/laser.png
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/laser.wav
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/Monoton-Regular.ttf
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/Monotro-Licens
提前致谢!
您需要 运行 在 %prep
部分中提取 tar ,如下所示:
%prep
%autosetup
%autosetup
宏将提取档案并将 Patch
es(如果有)应用于提取的源代码树。它可以用来代替旧的 %setup -q
.
我创建的规范文件有问题,无法在 tar.gz 文件中找到文件。我在这里转储了规范文件的内容。 tar.gz 文件在 ~/rpmbuild/SOURCES 中。我也会把 tar 列表放在下面。
Name: pyvaders
Version: 1
Release: 1%{?dist}
Summary: Space Invaders is a classic arcade game from the 1980s. PyInvaders is an implementation of this in python.
License: MIT
URL: https://github.com/nixbytes/pyvaders
Source0: pyvaders-1.1.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{release}-buildroot
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
%description
Space Invaders is a classic arcade game from the 1980s. PyInvaders is an implementation of this in python
Requires: python3-pygame
%prep
#mkdir -p $RPM_BUILD_ROOT/usr/local/bin/pyvaders
%build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
cp -aR pyvaders-1/ $RPM_BUILD_ROOT
#mv pyvaders-1.1/* $RPM_BUILD_ROOT
%check
%files
%attr(0744, root, root)
/usr/local/bin/pyvaders/assets/alien_enemy.png
/usr/local/bin/pyvaders/assets/alien.png
/usr/local/bin/pyvaders/assets/darkgrey_02.png
/usr/local/bin/pyvaders/assets/explosion.wav
/usr/local/bin/pyvaders/assets/laser.png
/usr/local/bin/pyvaders/assets/laser.wav
/usr/local/bin/pyvaders/assets/Monoton-Regular.ttf
/usr/local/bin/pyvaders/assets/Monotro-License
/usr/local/bin/pyvaders/assets/mountains03-1920-x-1080_full.png
/usr/local/bin/pyvaders/assets/mountains03-512-x-256_full.png
/usr/local/bin/pyvaders/assets/space-bg.jpg
/usr/local/bin/pyvaders/__init__.py
/usr/local/bin/pyvaders/main.py
这是 tar 文件的输出
tar -tvf pyvaders-1.1.tar.gz
drwxr-xr-x z/z 0 2020-12-03 20:43 usr/
drwxr-xr-x z/z 0 2020-12-03 20:43 usr/local/
drwxr-xr-x z/z 0 2020-12-03 20:43 usr/local/bin/
drwxr-xr-x z/z 0 2020-12-03 20:43 usr/local/bin/pyvaders/
-rw-r--r-- z/z 0 2020-12-03 20:43 usr/local/bin/pyvaders/__init__.py
-rwxr-xr-x z/z 4881 2020-12-03 20:43 usr/local/bin/pyvaders/main.py
drwxr-xr-x z/z 0 2020-12-03 20:43 usr/local/bin/pyvaders/assests/
-rwxr-xr-x z/z 51604 2020-12-03 20:43 usr/local/bin/pyvaders/assests/Monoton-Regular.ttf
-rw-r--r-- z/z 4527 2020-12-03 20:43 usr/local/bin/pyvaders/assests/Monotro-License
-rw-r--r-- z/z 1847 2020-12-03 20:43 usr/local/bin/pyvaders/assests/alien.png
-rw-r--r-- z/z 10015 2020-12-03 20:43 usr/local/bin/pyvaders/assests/alien_enemy.png
-rw-r--r-- z/z 7587 2020-12-03 20:43 usr/local/bin/pyvaders/assests/darkgrey_02.png
-rw-r--r-- z/z 336406 2020-12-03 20:43 usr/local/bin/pyvaders/assests/explosion.wav
-rw-r--r-- z/z 3086 2020-12-03 20:43 usr/local/bin/pyvaders/assests/laser.png
-rw-r--r-- z/z 34252 2020-12-03 20:43 usr/local/bin/pyvaders/assests/laser.wav
-rw-r--r-- z/z 142152 2020-12-03 20:43 usr/local/bin/pyvaders/assests/mountains03-1920-x-1080_full.png
-rw-r--r-- z/z 41767 2020-12-03 20:43 usr/local/bin/pyvaders/assests/mountains03-512-x-256_full.png
-rw-r--r-- z/z 373464 2020-12-03 20:43 usr/local/bin/pyvaders/assests/space-bg.jpg
这是错误信息
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/alien_enemy.png
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/alien.png
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/darkgrey_02.png
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/explosion.wav
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/laser.png
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/laser.wav
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/Monoton-Regular.ttf
File not found: /home/z/rpmbuild/BUILDROOT/pyvaders-1-1.fc33.x86_64/usr/local/bin/pyvaders/assets/Monotro-Licens
提前致谢!
您需要 运行 在 %prep
部分中提取 tar ,如下所示:
%prep
%autosetup
%autosetup
宏将提取档案并将 Patch
es(如果有)应用于提取的源代码树。它可以用来代替旧的 %setup -q
.