Author Topic: would like to create a RPM...  (Read 1510 times)

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3735
  • God knows, i'm not an Angel!
    • Tipps und Tricks
would like to create a RPM...
« on: July 06, 2009, 02:56:55 PM »
Hello

I would like to create a RPM about with http://www.pclinuxos.com/forum/index.php?topic=59353.0, I ve created the tar.gz and the spec file. When I runs the command "rpm -ba systemanalyse.spec" itś end with error.

Code: [Select]
[daniel@localhost SPECS]$ rpm -ba systemanalyse.spec
Ausführung(%prep): /bin/sh -e /home/daniel/RPM/tmp/rpm-tmp.98665
+ umask 022
+ cd /home/daniel/RPM/BUILD
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ rm -rf '%{BuildRoot}'
+ rm -rf /home/daniel/RPM/tmp/systemanalyse-0.1-1#leiche#2009
+ cd /home/daniel/RPM/BUILD
+ rm -rf systemanalyse-0.1.tar.gz
+ /usr/bin/gzip -dc /home/daniel/RPM/SOURCES/systemanalyse-0.1.tar.gz
+ tar -xvvf -
drwxrwxr-x daniel/daniel     0 2009-07-05 10:50 usr/
drwxrwxr-x daniel/daniel     0 2009-07-05 10:53 usr/share/
drwxrwxr-x daniel/daniel     0 2009-07-05 10:50 usr/share/systemanalyse/
-rwx------ daniel/daniel 13711 2009-07-04 20:38 usr/share/systemanalyse/systemanalyse.kmdr
drwxrwxr-x daniel/daniel     0 2009-07-05 10:53 usr/share/applications/
-rw-rw-r-- daniel/daniel   246 2009-07-05 11:31 usr/share/applications/systemanalyse.desktop
drwxrwxr-x daniel/daniel     0 2009-07-05 10:48 usr/bin/
-rwxrwxr-x daniel/daniel   233 2009-07-05 11:29 usr/bin/systemanalyse
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd systemanalyse-0.1.tar.gz
/home/daniel/RPM/tmp/rpm-tmp.98665: line 40: cd: systemanalyse-0.1.tar.gz: Datei oder Verzeichnis nicht gefunden
Fehler: Fehler-Status beim Beenden von /home/daniel/RPM/tmp/rpm-tmp.98665 (%prep)


Fehler beim Bauen des RPMS:
    Fehler-Status beim Beenden von /home/daniel/RPM/tmp/rpm-tmp.98665 (%prep)
[daniel@localhost SPECS]$


I have no idea why...
My spec file is

Code: [Select]
%define prefix /usr
%define name systemanalyse
%define version 0.1
%define release %mkrel 1
%define summary systemanalyse
%define url http://www.pclinuxos.com/forum/index.php?topic=59353.0
%define group Application


Name         : %{name}
Version      : %{version}
Release      : %{release}
Summary      : %{summary}

URL          : %{url}
Group        : %{group}
BuildRoot    : %_tmppath/%{name}-%{version}-%{release}

License      : GPL2
Source0      : %{name}-%{version}.tar.gz
Requires     : kdewebdev-kommander


%description
A Kommander GUI of systeminfos

%description -l de
Ein Kommander GUI fuer Systeminfos

%prep
rm -rf %{BuildRoot}
rm -rf $RPM_BUILD_ROOT

%setup -n %{name}-%{version}.tar.gz

%install
install -d -m 0755 %buildroot%_bindir
install -d -m 0755 %buildroot%_datadir/applications
install -d -m 0755 %buildroot%_datadir/%{name}

install -m 0755 $RPM_BUILD_DIR/%{name}-%{version}/usr/bin/%{name} %buildroot%_bindir/%{name}
install -m 0755 $RPM_BUILD_DIR/%{name}-%{version}/usr/share/applications/%{name}.desktop %buildroot%_datadir/applications/%{name}.desktop
install -m 0755 $RPM_BUILD_DIR/%{name}-%{version}/usr/share/%{name}/%{name}.kmdr %buildroot%_datadir/%{name}/%{name}.kmdr

%clean
rm -rf %{BuildRoot}
rm -rf %_tmppath/%{name}-%{version}

%post
%{update_menus}
%{update_desktop_database}

%preun
%{clean_menus}
%{clean_desktop_database}

%files
%defattr(-,root,root)
%_bindir/%{name}
%_datadir/applications/%{name}.desktop
%_datadir/%{name}/%{name}.kmdr


%changelog
* Sat Jul 05 2009 Leiche <MeissSW01@aol.com> 0.1-1pclos2009
- first build

the tmp file

Code: [Select]
#!/bin/sh

  RPM_SOURCE_DIR="/home/daniel/RPM/SOURCES"
  RPM_BUILD_DIR="/home/daniel/RPM/BUILD"
  RPM_OPT_FLAGS="-O2  -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fomit-frame-pointer -march=i586 -mtune=pentiumpro -fasynchronous-unwind-tables"
  RPM_ARCH="i386"
  RPM_OS="linux"
  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
  RPM_DOC_DIR="/usr/share/doc"
  export RPM_DOC_DIR
  RPM_PACKAGE_NAME="systemanalyse"
  RPM_PACKAGE_VERSION="0.1"
  RPM_PACKAGE_RELEASE="1#leiche#2009"
  export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
  RPM_BUILD_ROOT="/home/daniel/RPM/tmp/systemanalyse-0.1-1#leiche#2009"
  export RPM_BUILD_ROOT
 
  unset PERL_MM_OPT
  LANG=C
  export LANG
  unset DISPLAY
 
  set -x
  umask 022
  cd /home/daniel/RPM/BUILD
[           1      -eq 1 ] || exit 0
[           1      -eq 1 ] || exit 0
[           1      -eq 1 ] || exit 0

rm -rf %{BuildRoot}
rm -rf $RPM_BUILD_ROOT

cd /home/daniel/RPM/BUILD
rm -rf systemanalyse-0.1.tar.gz
/usr/bin/gzip -dc /home/daniel/RPM/SOURCES/systemanalyse-0.1.tar.gz | tar -xvvf -
STATUS=$?
if [ $STATUS -ne 0 ]; then
  exit $STATUS
fi
cd systemanalyse-0.1.tar.gz



exit 0

The archiv can be found here
http://www.file-upload.net/download-1746369/systemanalyse-0.1.tar.gz.html

But where is the problem ?
Thank You

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: would like to create a RPM...
« Reply #1 on: July 06, 2009, 03:13:43 PM »
Just a guess, but is %mkrel defined correctly?

RPM_BUILD_ROOT="/home/daniel/RPM/tmp/systemanalyse-0.1-1#leiche#2009"

Are hashmarks allowed in directory and file names?  I'll have to try that when I get back on my system.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3735
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: would like to create a RPM...
« Reply #2 on: July 06, 2009, 03:21:50 PM »
in my .rpmmacros is written
Code: [Select]
%_topdir         /home/daniel/RPM
%_tmppath        /home/daniel/RPM/tmp
%distribution    PCLinuxOS
%vendor          PCLinuxOS Community
%distsuffix      #leiche#

That´s wrong ?
thankś

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: would like to create a RPM...
« Reply #3 on: July 06, 2009, 03:29:20 PM »
Have you read this:
http://www.badtexomnibot.com/doku/doku.php/rpm-how-to:intro
If not, it might help.
Might want to get some translation folks to work on that making that available.
« Last Edit: July 06, 2009, 03:31:02 PM by Joble »
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12512
Re: would like to create a RPM...
« Reply #4 on: July 06, 2009, 03:53:58 PM »
Step one fix your spec file.
Code: [Select]
%define prefix /usr
%define name systemanalyse
%define version 0.1
%define release %mkrel 1
%define summary systemanalyse
%define url http://www.pclinuxos.com/forum/index.php?topic=59353.0
%define group Monitoring


Name         : %{name}
Version      : %{version}
Release      : %{release}
Summary      : %{summary}

URL          : %{url}
Group        : %{group}

License      : GPL2
Source0      : %{name}-%{version}.tar.gz
Requires     : kdewebdev-kommander
BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-buildroot


%description
A Kommander GUI of systeminfos

%description -l de
Ein Kommander GUI fuer Systeminfos

%prep

%setup -q

%install
install -d -m 0755 %buildroot%_bindir
install -d -m 0755 %buildroot%_datadir/applications
install -d -m 0755 %buildroot%_datadir/%{name}

install -m 0755 $RPM_BUILD_DIR/%{name}-%{version}/usr/bin/%{name} %buildroot%_bindir/%{name}
install -m 0644 $RPM_BUILD_DIR/%{name}-%{version}/usr/share/applications/%{name}.desktop %buildroot%_datadir/applications/%{name}.desktop
install -m 0755 $RPM_BUILD_DIR/%{name}-%{version}/usr/share/%{name}/%{name}.kmdr %buildroot%_datadir/%{name}/%{name}.kmdr

%clean
rm -rf %{BuildRoot}

%post
%{update_menus}
%{update_desktop_database}

%postun
%{clean_menus}
%{clean_desktop_database}

%files
%defattr(-,root,root)
%_bindir/%{name}
%_datadir/applications/%{name}.desktop
%_datadir/%{name}/%{name}.kmdr


%changelog
* Sat Jul 05 2009 Leiche <MeissSW01@aol.com> 0.1-1pclos2009
- first build

Step two fix your tarball.

mkdir systemanalyse-0.1 then put your files/folders in this folder and compress it  into systemanalyse-0.1.tar.gz and put it in the SOURCES folder.

Step three add this to your desktop file category entry.
Categories=Infos;System;Monitor;X-MandrivaLinux-System-Monitoring;

« Last Edit: July 06, 2009, 03:56:31 PM by texstar »

Thanks to everyone who donates. You keep the servers running.

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: would like to create a RPM...
« Reply #5 on: July 06, 2009, 05:32:56 PM »
BINGO!  Yes I'm Shouting!  Leiche your spec file has the solution I've been looking for!  Thank you very much!

Thank you too Tex!

Oddly enough, hashmarks do seem to be allowed in filenames, but %distsuffix should be pclos
« Last Edit: July 06, 2009, 06:06:50 PM by Joble »
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3735
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: would like to create a RPM...
« Reply #6 on: July 07, 2009, 09:29:01 AM »
Oddly enough, hashmarks do seem to be allowed in filenames, but %distsuffix should be pclos
Thanks and have done...

@texstar
Thanks, too
Now I look the correction in the spec file to learn more about...

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3735
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: would like to create a RPM...
« Reply #7 on: July 08, 2009, 03:37:08 PM »
once issues ...
Quote from: texstar
Step three add this to your desktop file category entry.
Categories=Infos;System;Monitor;X-MandrivaLinux-System-Monitoring;
Where can I see, what is what ? or how itś wrote ?

When I have a package ready, where must I send it ?
And what is need too ?

Thank You

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: would like to create a RPM...
« Reply #8 on: July 08, 2009, 04:20:12 PM »
.desktop categories:  I don't know if this is the best reference, but I've been reading up on it a bit.

http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html

I still cross my fingers, do my best, hope it works and wait to see what Tex does with my spec files.

As far as getting into contribs, not sure who's in charge of that, at the moment.
« Last Edit: July 08, 2009, 04:23:07 PM by Joble »
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System