savagehobo
21st April 2010, 08:05 AM
Hello,
I have been trying to create a custom RPM package to be used in a custom live cd I've been creating for a school project. I have almost completed the Live CD, but am trying to add a custom background. With some googling it looks like creating an RPM package to add the background file to the /usr/share/backgrounds folder and then using a gconftool-2 command to set the default background is the way to go.
I have been reading through the http://fedoraproject.org/wiki/PackageMaintainers/CreatingPackageHowTo information page and have started to create a .spec file for the package. I am running this on an Inspiron 6400 Laptop running F12. I installed the "Developer Tools", rpmdevtools, and ran the rpmdev-setuptree
command in the home directory.
The background file is called 1280-wide.png and I have put it in my ~/rpmbuild/SOURCES directory. My spec file is shown below:
Name: chd-backgrounds
Version: 1.0
Release: 1%{?dist}
Summary: Package contains background files to be used in CHD Linux Live USB/CD distrobution.
Group: User Interface/Desktops
License: GPLv2+
URL: -------------- I REMOVED THIS-----------------------
Source0: -------------------- I REMOVED THIS----------------------
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#BuildRequires:
#Requires:
%description
Package contains background files to be used in CHD Linux Live USB/CD distrobution
%prep
%setup -q
%build
%configure
%make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
cp -p 1280-wide.png /usr/share/backgrounds
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc
%/usr/share/backgrounds/1280-wide.png
%changelog
When I try to run "rpmbuild -ba SPECS/chd-backgrounds.spec" I get...
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.9xSn5s
+ umask 022
+ cd /home/user/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/user/rpmbuild/BUILD
+ rm -rf chd-backgrounds-1.0
+ /bin/tar -xf /home/user/rpmbuild/SOURCES/1280-wide.png
/bin/tar: This does not look like a tar archive
/bin/tar: Skipping to next header
/bin/tar: Exiting with failure status due to previous errors
error: Bad exit status from /var/tmp/rpm-tmp.9xSn5s (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.9xSn5s (%prep)
The info from the file specified is:
.....
cd '/home/user/rpmbuild/BUILD'
rm -rf 'chd-backgrounds-1.0'
/bin/tar -xf /home/user/rpmbuild/SOURCES/1280-wide.png
cd 'chd-backgrounds-1.0'
/bin/chmod -Rf a+rX,u+w,g-w,o-w .
It looks like it's trying to cd into a directory that was just removed but I'm not really sure.... Anyone have some suggestions?
I have been trying to create a custom RPM package to be used in a custom live cd I've been creating for a school project. I have almost completed the Live CD, but am trying to add a custom background. With some googling it looks like creating an RPM package to add the background file to the /usr/share/backgrounds folder and then using a gconftool-2 command to set the default background is the way to go.
I have been reading through the http://fedoraproject.org/wiki/PackageMaintainers/CreatingPackageHowTo information page and have started to create a .spec file for the package. I am running this on an Inspiron 6400 Laptop running F12. I installed the "Developer Tools", rpmdevtools, and ran the rpmdev-setuptree
command in the home directory.
The background file is called 1280-wide.png and I have put it in my ~/rpmbuild/SOURCES directory. My spec file is shown below:
Name: chd-backgrounds
Version: 1.0
Release: 1%{?dist}
Summary: Package contains background files to be used in CHD Linux Live USB/CD distrobution.
Group: User Interface/Desktops
License: GPLv2+
URL: -------------- I REMOVED THIS-----------------------
Source0: -------------------- I REMOVED THIS----------------------
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#BuildRequires:
#Requires:
%description
Package contains background files to be used in CHD Linux Live USB/CD distrobution
%prep
%setup -q
%build
%configure
%make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
cp -p 1280-wide.png /usr/share/backgrounds
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc
%/usr/share/backgrounds/1280-wide.png
%changelog
When I try to run "rpmbuild -ba SPECS/chd-backgrounds.spec" I get...
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.9xSn5s
+ umask 022
+ cd /home/user/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/user/rpmbuild/BUILD
+ rm -rf chd-backgrounds-1.0
+ /bin/tar -xf /home/user/rpmbuild/SOURCES/1280-wide.png
/bin/tar: This does not look like a tar archive
/bin/tar: Skipping to next header
/bin/tar: Exiting with failure status due to previous errors
error: Bad exit status from /var/tmp/rpm-tmp.9xSn5s (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.9xSn5s (%prep)
The info from the file specified is:
.....
cd '/home/user/rpmbuild/BUILD'
rm -rf 'chd-backgrounds-1.0'
/bin/tar -xf /home/user/rpmbuild/SOURCES/1280-wide.png
cd 'chd-backgrounds-1.0'
/bin/chmod -Rf a+rX,u+w,g-w,o-w .
It looks like it's trying to cd into a directory that was just removed but I'm not really sure.... Anyone have some suggestions?