rpmbuild is searching files in %_buildrootdir/âpackage nameâ and there is nothing there
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I need to put the kernel headers in a non standard location, and I want to do it automatically with yum
, so I downloaded the rpm corresponding to the current headers in the latest version of CentOS, and made the following SPEC file:
%global PKG_NAME linux-headers
%global SRC_NAME kernel-headers
%global RISE_DISTRIBUTED_PATH /opt/distributed_tools
%global SRC_PATH %_sourcedir
%global BUILD_PATH %_builddir
%global INSTALL_PATH %_buildrootdir%DISTRIBUTED_PATH
%global PKG_VER %(uname -r | sed 's/-/./g')
Name: distributed_kernel_headers
Version: %PKG_VER
Release: 1%?dist
Summary: The Linux kernel Headers
License: GPLv2
Group: System Environment/Kernel
URL: http://www.kernel.org/
Source: kernel.rpm
BuildRequires: yum-utils, sed, rpmdev-tools
Provides: distributed_headers
%description
Kernel-headers includes the C header files that specify the interface
between the Linux kernel and userspace libraries and programs. The
header files define structures and constants that are needed for
building most standard programs and are also needed for rebuilding the
glibc package.
%prep
cd %BUILD_PATH
mkdir %PKG_NAME
%build
cd %BUILD_PATH/%PKG_NAME
rpm2cpio %SRC_PATH/%(SRC_NAME)* | cpio -idvm --owner=$(whoami) &> /dev/null
%install
##rm -rf %buildroot
mkdir -pv %INSTALL_PATH/%PKG_NAME"-$(uname -r)"
mkdir -pv %INSTALL_PATH/include/%PKG_NAME/
cp -R %BUILD_PATH/%PKG_NAME/usr/include/* %INSTALL_PATH/%PKG_NAME"-$(uname -r)"
# ln -s %INSTALL_PATH/%PKG_NAME"-$(uname -r)"/* %INSTALL_PATH/include/%PKG_NAME/
%files
%defattr(-,root,root,-)
/opt/
%clean
rm -Rf %BUILD_PATH %_buildrootdir
%changelog
Everything works fine with rpmbuild -ba
until the file section, in which the following error appears:
error: File not found by glob: /home/make_toolchain/rpmbuild/BUILDROOT/distributed_kernel_headers-3.10.0.693.21.1.el7.x86_64-1.el7.centos.x86_64/opt
According to everything that I've read, the file section looks for the files in %_buildrootdir
, but in this case this is not happening, and I do not know what is causing this error.
Also there is no special variable set for the rpmbuild enviroment. And every file gets writen to %_builrootdir/opt/distributed_tools/
centos rpmbuild rpm-spec
add a comment |Â
up vote
0
down vote
favorite
I need to put the kernel headers in a non standard location, and I want to do it automatically with yum
, so I downloaded the rpm corresponding to the current headers in the latest version of CentOS, and made the following SPEC file:
%global PKG_NAME linux-headers
%global SRC_NAME kernel-headers
%global RISE_DISTRIBUTED_PATH /opt/distributed_tools
%global SRC_PATH %_sourcedir
%global BUILD_PATH %_builddir
%global INSTALL_PATH %_buildrootdir%DISTRIBUTED_PATH
%global PKG_VER %(uname -r | sed 's/-/./g')
Name: distributed_kernel_headers
Version: %PKG_VER
Release: 1%?dist
Summary: The Linux kernel Headers
License: GPLv2
Group: System Environment/Kernel
URL: http://www.kernel.org/
Source: kernel.rpm
BuildRequires: yum-utils, sed, rpmdev-tools
Provides: distributed_headers
%description
Kernel-headers includes the C header files that specify the interface
between the Linux kernel and userspace libraries and programs. The
header files define structures and constants that are needed for
building most standard programs and are also needed for rebuilding the
glibc package.
%prep
cd %BUILD_PATH
mkdir %PKG_NAME
%build
cd %BUILD_PATH/%PKG_NAME
rpm2cpio %SRC_PATH/%(SRC_NAME)* | cpio -idvm --owner=$(whoami) &> /dev/null
%install
##rm -rf %buildroot
mkdir -pv %INSTALL_PATH/%PKG_NAME"-$(uname -r)"
mkdir -pv %INSTALL_PATH/include/%PKG_NAME/
cp -R %BUILD_PATH/%PKG_NAME/usr/include/* %INSTALL_PATH/%PKG_NAME"-$(uname -r)"
# ln -s %INSTALL_PATH/%PKG_NAME"-$(uname -r)"/* %INSTALL_PATH/include/%PKG_NAME/
%files
%defattr(-,root,root,-)
/opt/
%clean
rm -Rf %BUILD_PATH %_buildrootdir
%changelog
Everything works fine with rpmbuild -ba
until the file section, in which the following error appears:
error: File not found by glob: /home/make_toolchain/rpmbuild/BUILDROOT/distributed_kernel_headers-3.10.0.693.21.1.el7.x86_64-1.el7.centos.x86_64/opt
According to everything that I've read, the file section looks for the files in %_buildrootdir
, but in this case this is not happening, and I do not know what is causing this error.
Also there is no special variable set for the rpmbuild enviroment. And every file gets writen to %_builrootdir/opt/distributed_tools/
centos rpmbuild rpm-spec
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I need to put the kernel headers in a non standard location, and I want to do it automatically with yum
, so I downloaded the rpm corresponding to the current headers in the latest version of CentOS, and made the following SPEC file:
%global PKG_NAME linux-headers
%global SRC_NAME kernel-headers
%global RISE_DISTRIBUTED_PATH /opt/distributed_tools
%global SRC_PATH %_sourcedir
%global BUILD_PATH %_builddir
%global INSTALL_PATH %_buildrootdir%DISTRIBUTED_PATH
%global PKG_VER %(uname -r | sed 's/-/./g')
Name: distributed_kernel_headers
Version: %PKG_VER
Release: 1%?dist
Summary: The Linux kernel Headers
License: GPLv2
Group: System Environment/Kernel
URL: http://www.kernel.org/
Source: kernel.rpm
BuildRequires: yum-utils, sed, rpmdev-tools
Provides: distributed_headers
%description
Kernel-headers includes the C header files that specify the interface
between the Linux kernel and userspace libraries and programs. The
header files define structures and constants that are needed for
building most standard programs and are also needed for rebuilding the
glibc package.
%prep
cd %BUILD_PATH
mkdir %PKG_NAME
%build
cd %BUILD_PATH/%PKG_NAME
rpm2cpio %SRC_PATH/%(SRC_NAME)* | cpio -idvm --owner=$(whoami) &> /dev/null
%install
##rm -rf %buildroot
mkdir -pv %INSTALL_PATH/%PKG_NAME"-$(uname -r)"
mkdir -pv %INSTALL_PATH/include/%PKG_NAME/
cp -R %BUILD_PATH/%PKG_NAME/usr/include/* %INSTALL_PATH/%PKG_NAME"-$(uname -r)"
# ln -s %INSTALL_PATH/%PKG_NAME"-$(uname -r)"/* %INSTALL_PATH/include/%PKG_NAME/
%files
%defattr(-,root,root,-)
/opt/
%clean
rm -Rf %BUILD_PATH %_buildrootdir
%changelog
Everything works fine with rpmbuild -ba
until the file section, in which the following error appears:
error: File not found by glob: /home/make_toolchain/rpmbuild/BUILDROOT/distributed_kernel_headers-3.10.0.693.21.1.el7.x86_64-1.el7.centos.x86_64/opt
According to everything that I've read, the file section looks for the files in %_buildrootdir
, but in this case this is not happening, and I do not know what is causing this error.
Also there is no special variable set for the rpmbuild enviroment. And every file gets writen to %_builrootdir/opt/distributed_tools/
centos rpmbuild rpm-spec
I need to put the kernel headers in a non standard location, and I want to do it automatically with yum
, so I downloaded the rpm corresponding to the current headers in the latest version of CentOS, and made the following SPEC file:
%global PKG_NAME linux-headers
%global SRC_NAME kernel-headers
%global RISE_DISTRIBUTED_PATH /opt/distributed_tools
%global SRC_PATH %_sourcedir
%global BUILD_PATH %_builddir
%global INSTALL_PATH %_buildrootdir%DISTRIBUTED_PATH
%global PKG_VER %(uname -r | sed 's/-/./g')
Name: distributed_kernel_headers
Version: %PKG_VER
Release: 1%?dist
Summary: The Linux kernel Headers
License: GPLv2
Group: System Environment/Kernel
URL: http://www.kernel.org/
Source: kernel.rpm
BuildRequires: yum-utils, sed, rpmdev-tools
Provides: distributed_headers
%description
Kernel-headers includes the C header files that specify the interface
between the Linux kernel and userspace libraries and programs. The
header files define structures and constants that are needed for
building most standard programs and are also needed for rebuilding the
glibc package.
%prep
cd %BUILD_PATH
mkdir %PKG_NAME
%build
cd %BUILD_PATH/%PKG_NAME
rpm2cpio %SRC_PATH/%(SRC_NAME)* | cpio -idvm --owner=$(whoami) &> /dev/null
%install
##rm -rf %buildroot
mkdir -pv %INSTALL_PATH/%PKG_NAME"-$(uname -r)"
mkdir -pv %INSTALL_PATH/include/%PKG_NAME/
cp -R %BUILD_PATH/%PKG_NAME/usr/include/* %INSTALL_PATH/%PKG_NAME"-$(uname -r)"
# ln -s %INSTALL_PATH/%PKG_NAME"-$(uname -r)"/* %INSTALL_PATH/include/%PKG_NAME/
%files
%defattr(-,root,root,-)
/opt/
%clean
rm -Rf %BUILD_PATH %_buildrootdir
%changelog
Everything works fine with rpmbuild -ba
until the file section, in which the following error appears:
error: File not found by glob: /home/make_toolchain/rpmbuild/BUILDROOT/distributed_kernel_headers-3.10.0.693.21.1.el7.x86_64-1.el7.centos.x86_64/opt
According to everything that I've read, the file section looks for the files in %_buildrootdir
, but in this case this is not happening, and I do not know what is causing this error.
Also there is no special variable set for the rpmbuild enviroment. And every file gets writen to %_builrootdir/opt/distributed_tools/
centos rpmbuild rpm-spec
edited Mar 15 at 22:04
guntbert
9651817
9651817
asked Mar 15 at 21:19
fmcga
11
11
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f430492%2frpmbuild-is-searching-files-in-buildrootdir-package-name-and-there-is-noth%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password