Hi all,
I am using F16 and looking for a package of http://code.google.com/p/geben-on-emacs/
Would you now one? I've searched but did not find, I'm ready to package it, but if it existed even on an old version, it could ease the work.
So, if someone in here knew one, I'd be glad to hear of it.
Thank you! :-)
Hi,
I am using the following spec file
Summary: pcore binary Name: pcore Version: 0.1 Release: Beta Epoch: 0 License: Commercial Group: Applications/Telecommunications Packager: Kamal Ahmed kamal.ahmed@unleashbts.com URL: http://pcore.bts.md/ Source: pcore-0.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description ElementalCORE
%prep %setup -qn pcore
%build %{__make}
%install mkdir -p %{name} mkdir -p %{_bindir} install -d %{name}
%clean
%files %defattr(-,root,root) %doc NEWS
But when running rpmbuild -dd pcore.spec , i get error:
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.32035 + umask 022 + cd /home/kahmed/rpmbuild/BUILD + cd pcore + LANG=C + export LANG + unset DISPLAY + mkdir -p pcore + mkdir -p /usr/bin + install -d pcore + /usr/lib/rpm/find-debuginfo.sh /home/kahmed/rpmbuild/BUILD/pcore find: /var/tmp/pcore-0.1-Beta-root: No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.32035 (%install)
Now from what i understand the "BUILD" Happens in a TEMP area, or any place that the user has permissions to create directories and files. What i am trying to do is to copy the binary executables, when get created as a result of make to /usr/bin ( so i think that this /usr/bin would also be in the temp area and not on the actual /usr/bin) right ?
On Fri, 13 Apr 2012 06:49:40 -0700 (PDT), KA (Kamal) wrote:
Hi,
I am using the following spec file
Summary: pcore binary Name: pcore Version: 0.1 Release: Beta Epoch: 0 License: Commercial Group: Applications/Telecommunications Packager: Kamal Ahmed kamal.ahmed@unleashbts.com URL: http://pcore.bts.md/ Source: pcore-0.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description ElementalCORE
%prep %setup -qn pcore
%build %{__make}
%install mkdir -p %{name} mkdir -p %{_bindir} install -d %{name}
These three don't make sense. Read on...
%clean
%files %defattr(-,root,root) %doc NEWS
But when running rpmbuild -dd pcore.spec , i get error:
What is -dd? Perhaps just a type mistake and you meant -bb. Correct?
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.32035
- umask 022
- cd /home/kahmed/rpmbuild/BUILD
- cd pcore
Here the "builddir" was entered. The top directory of the extracted source tarball.
One which platform did you do this build attempt? It doesn't look like a recent Fedora or RHEL platform, because those would empty'n'create the %buildroot directory. That is missing in what you've quoted.
- LANG=C
- export LANG
- unset DISPLAY
- mkdir -p pcore
- mkdir -p /usr/bin
- install -d pcore
These three commands operated within the build directory, not in the %buildroot. To operated in the buildroot, you need to use the prefix %{buildroot} or $RPM_BUILD_ROOT with every path.
- /usr/lib/rpm/find-debuginfo.sh /home/kahmed/rpmbuild/BUILD/pcore
find: /var/tmp/pcore-0.1-Beta-root: No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.32035 (%install)
This refers to the buildroot, the path specified in the "BuildRoot:" tag. It doesn't exist for your build, because apparently you use a very old Fedora where you need to do the following in the %install section:
%install rm -rf %{buildroot} mkdir -p %{buildroot} # ...
Michael,
1.
%install mkdir -p %{name} mkdir -p %{_bindir} install -d %{name}
These three don't make sense. Read on...
- Yes, they do not make sense, i as just experimenting. my intention was to use the %install section, to create
directories like /usr/bin in "temp"/build area to be able to copy the executables there later on. Especially since the makefile does NOT have "install" section
2. What is -dd? Perhaps just a type mistake and you meant -bb. Correct? yes its a typo, i meant -bb
3. One which platform did you do this build attempt? CentOs 32 bit 5.8
Since that IS the target platform, and as far as i understand rpmbuild has to run ON the target platform.
4. i made some progress..
here is an updated pcore.spec
Source: pcore-0.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: gcc = 4.1.2 BuildRequires: make >= 3.81 BuildRequires: postgresql84-devel = 8.4.9
%description ElementalCORE
%prep %setup -qn pcore
%build %{__make}
%install mkdir -p %{_tmppath}/%{name}-%{version}-%{release} mkdir -p %{name} mkdir -p %{_bindir} install -d %{name}
%clean
%files %defattr(-,root,root) %doc NEWS
and i WAS able to get an rpm build with NEWS in the folder /usr/share/doc/pcore-0.1/NEWS
Now i want to copy /pcore/obj/ggsnc/ggsnc to /usr/bin/ How? I have NO idea
I really appreciate your help. Thanks, -Kamal.
From: Michael Schwendt mschwendt@gmail.com To: packaging@lists.fedoraproject.org Sent: Friday, April 13, 2012 11:56 AM Subject: Re: [Fedora-packaging] find: /var/tmp/pcore-0.1-Beta-root: No such file or directory
On Fri, 13 Apr 2012 06:49:40 -0700 (PDT), KA (Kamal) wrote:
Hi,
I am using the following spec file
Summary: pcore binary Name: pcore Version: 0.1 Release: Beta Epoch: 0 License: Commercial Group: Applications/Telecommunications Packager: Kamal Ahmed kamal.ahmed@unleashbts.com URL: http://pcore.bts.md/ Source: pcore-0.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description ElementalCORE
%prep %setup -qn pcore
%build %{__make}
%install mkdir -p %{name} mkdir -p %{_bindir} install -d %{name}
These three don't make sense. Read on...
%clean
%files %defattr(-,root,root) %doc NEWS
But when running rpmbuild -dd pcore.spec , i get error:
What is -dd? Perhaps just a type mistake and you meant -bb. Correct?
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.32035
- umask 022
- cd /home/kahmed/rpmbuild/BUILD
- cd pcore
Here the "builddir" was entered. The top directory of the extracted source tarball.
One which platform did you do this build attempt? It doesn't look like a recent Fedora or RHEL platform, because those would empty'n'create the %buildroot directory. That is missing in what you've quoted.
- LANG=C
- export LANG
- unset DISPLAY
- mkdir -p pcore
- mkdir -p /usr/bin
- install -d pcore
These three commands operated within the build directory, not in the %buildroot. To operated in the buildroot, you need to use the prefix %{buildroot} or $RPM_BUILD_ROOT with every path.
- /usr/lib/rpm/find-debuginfo.sh /home/kahmed/rpmbuild/BUILD/pcore
find: /var/tmp/pcore-0.1-Beta-root: No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.32035 (%install)
This refers to the buildroot, the path specified in the "BuildRoot:" tag. It doesn't exist for your build, because apparently you use a very old Fedora where you need to do the following in the %install section:
%install rm -rf %{buildroot} mkdir -p %{buildroot}
# ...
packaging mailing list packaging@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/packaging
On Fri, 13 Apr 2012 10:12:14 -0700 (PDT), KA (Kamal) wrote:
- One which platform did you do this build attempt?
CentOs 32 bit 5.8
The you need to adjust your spec file %install section as I explained in my previous reply. You can read it here, too:
https://fedoraproject.org/wiki/EPEL/GuidelinesAndPolicies#Prepping_BuildRoot...
Since that IS the target platform, and as far as i understand rpmbuild has to run ON the target platform.
Not enough info to conclude whether you misunderstand something.
- i made some progress..
here is an updated pcore.spec
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
Kindly pay attention to what I've written before, please. I've pointed out that this "BuildRoot" tag specifies the path you are interest in. Now:
%install mkdir -p %{_tmppath}/%{name}-%{version}-%{release} mkdir -p %{name} mkdir -p %{_bindir} install -d %{name}
You here want to use $RPM_BUILD_ROOT or %buildroot as explained earlier. It is not helpful, if you go on with your own strange experiments instead of following advice.
%install rm -rf %{buildroot} mkdir -p %{buildroot} # and then continue to create files in that buildroot # for example: mkdir -p %{buildroot}%{_bindir}
%files %defattr(-,root,root) %doc NEWS
and i WAS able to get an rpm build with NEWS in the folder /usr/share/doc/pcore-0.1/NEWS
That is something entirely different. The %doc statement as you use it here for the NEWS file, copies the specified file from the builddir into the buildroot's default docdir. That has nothing to do with your %install section _except_ that the buildroot directory must exist (which is why you need to create it for CentOS 5.8).
Now i want to copy /pcore/obj/ggsnc/ggsnc to /usr/bin/ How?
cp -p your LOCALPATH/TO/THE/FILE %{buildroot}%{_bindir}
where the local path refers to a file within the builddir.
I have NO idea
Don't rush. Read replies more slowly and comment on specific quotes instead of quoting everything at the bottom.
Hi, Is there a way to get rid of this error, since i cannot build any rpm now. I have googled this and cannot find a resolution. Thanks, -Kamal.
Found a solution
echo "%debug_package %{nil}" >> ~/.rpmmacros
From: Kamal Ahmed kamal2222ahmed@yahoo.com To: "packaging@lists.fedoraproject.org" packaging@lists.fedoraproject.org Sent: Friday, April 13, 2012 3:59 PM Subject: [Fedora-packaging] error: Package already exists: %package debuginfo
Hi, Is there a way to get rid of this error, since i cannot build any rpm now. I have googled this and cannot find a resolution. Thanks, -Kamal.
-- packaging mailing list packaging@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/packaging
On Fri, 13 Apr 2012 13:54:54 -0700 (PDT), KA (Kamal) wrote:
Found a solution
echo "%debug_package %{nil}" >> ~/.rpmmacros
Not good. That disables the automatic -debuginfo package builds. The better "fix" for your problem would be to drop the %package debuginfo from your spec file, because you are not supposed to handle the debuginfo files yourself. You haven't told why you added such a %package definition to your spec file.
ok removed the macro from .rpmmacros
i think the error was because i had comment
#This ... in the %install section
since i did NOT have any
%package debuginfo
hence i deduce that
So i am back to reading up on Rules and regulations on what is allowed and recommended practices but not sure where i can find detailed information i am reading Maximum RPM and looking at
http://stereochro.me/ideas/rpm-for-the-unwilling
From: Michael Schwendt mschwendt@gmail.com
To: packaging@lists.fedoraproject.org
Sent: Friday, April 13, 2012 5:06 PM Subject: Re: [Fedora-packaging] error: Package already exists: %package debuginfo
On Fri, 13 Apr 2012 13:54:54 -0700 (PDT), KA (Kamal) wrote:
Found a solution
echo "%debug_package %{nil}" >> ~/.rpmmacros
Not good. That disables the automatic -debuginfo package builds. The better "fix" for your problem would be to drop the %package debuginfo from your spec file, because you are not supposed to handle the debuginfo files yourself. You haven't told why you added such a %package definition to your spec file. -- packaging mailing list packaging@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/packaging
On Fri, 13 Apr 2012 14:47:33 -0700 (PDT), KA (Kamal) wrote:
ok removed the macro from .rpmmacros
i think the error was because i had comment
#This ... in the %install section
since i did NOT have any
%package debuginfo
hence i deduce that
A comment within the %install section does not cause an error like that, but be careful with RPM macros in comments. They are expanded, too, and can lead to unexpected results/errors.
A full .spec file is easier to review than just an error message without any context. ;-)
I have looked everywhere and still cannot find any example of SPEC which installs the binary files created as a result of Make. ( if the Makefile is missing the install section )
so here is what i have from a tutorial.
Name: foo ... BuildRoot: /tmp/%{name} %prep ... %build ... %install install -m755 $RPM_BUILD_ROOT/obj/ggsnc/ggsnc %{_bindir}/ %files /usr/bin/ggsnc
but i get error:
+ umask 022 + cd /home/kahmed/rpmbuild/BUILD + cd pcore + LANG=C + export LANG + unset DISPLAY + install -m755 /tmp/pcore/obj/ggsnc/ggsnc /usr/bin/ install: cannot stat `/tmp/pcore/obj/ggsnc/ggsnc': No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.93457 (%install)
now ALL i want to do is to copy /home/kahmed/rpmbuild/BUILD/pcore/obj/ggsnc/ggsnc to /usr/bin in a root simulated environment.
Now all the examples i am looking at use makefile install, or automake, so i cannot reverse engineer.
Thanks, -Kamal.
From: Michael Schwendt mschwendt@gmail.com To: packaging@lists.fedoraproject.org Sent: Saturday, April 14, 2012 6:45 AM Subject: Re: [Fedora-packaging] error: Package already exists: %package debuginfo
On Fri, 13 Apr 2012 14:47:33 -0700 (PDT), KA (Kamal) wrote:
ok removed the macro from .rpmmacros
i think the error was because i had comment
#This ... in the %install section
since i did NOT have any
%package debuginfo
hence i deduce that
A comment within the %install section does not cause an error like that, but be careful with RPM macros in comments. They are expanded, too, and can lead to unexpected results/errors.
A full .spec file is easier to review than just an error message without any context. ;-) -- packaging mailing list packaging@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/packaging
Hi Ahmed you probably want:
%install install -D -m 755 obj/ggsnc/ggsnc $RPM_BUILD_ROOT%{_bindir}/
%files %{_bindir}/ggsnc
Best regards Michal Ambroz
< ------------ Původní zpráva ------------ < Od: Kamal Ahmed kamal2222ahmed@yahoo.com < Předmět: Re: [Fedora-packaging] error: Package already exists: %package < debuginfo < Datum: 15.4.2012 22:56:13 < ---------------------------------------- < I have looked everywhere and still cannot find any example of SPEC which < installs the binary files created as a result of Make. < ( if the Makefile is missing the install section ) < < < so here is what i have from a tutorial. < < Name: foo ... BuildRoot: /tmp/%{name} %prep ... %build ... %install install < -m755 $RPM_BUILD_ROOT/obj/ggsnc/ggsnc %{_bindir}/ %files /usr/bin/ggsnc < < but i get error: < < + umask 022 < + cd /home/kahmed/rpmbuild/BUILD < + cd pcore < + LANG=C < + export LANG < + unset DISPLAY < + install -m755 /tmp/pcore/obj/ggsnc/ggsnc /usr/bin/ < install: cannot stat `/tmp/pcore/obj/ggsnc/ggsnc': No such file or directory < error: Bad exit status from /var/tmp/rpm-tmp.93457 (%install) < < < now ALL i want to do is to copy < /home/kahmed/rpmbuild/BUILD/pcore/obj/ggsnc/ggsnc to /usr/bin < in a root simulated environment. < < Now all the examples i am looking at use makefile install, or automake, so i < cannot reverse engineer. < < Thanks, < -Kamal. < < < >________________________________ < > From: Michael Schwendt mschwendt@gmail.com < >To: packaging@lists.fedoraproject.org < >Sent: Saturday, April 14, 2012 6:45 AM < >Subject: Re: [Fedora-packaging] error: Package already exists: %package < debuginfo < > < >On Fri, 13 Apr 2012 14:47:33 -0700 (PDT), KA (Kamal) wrote: < > < >> ok removed the macro from .rpmmacros < >> < >> i think the error was because i had comment < >> < >> #This ... < >> in the %install section < >> < >> since i did NOT have any < >> < >> %package debuginfo < >> < >> hence i deduce that < > < >A comment within the %install section does not cause an error like that, < >but be careful with RPM macros in comments. They are expanded, too, and < >can lead to unexpected results/errors. < > < >A full .spec file is easier to review than just an error message without < >any context. ;-) < >-- < >packaging mailing list < >packaging@lists.fedoraproject.org < >https://admin.fedoraproject.org/mailman/listinfo/packaging < > < > < <
Kamal Ahmed wrote:
Name: foo ... BuildRoot: /tmp/%{name} %prep ... %build ... %install install -m755 $RPM_BUILD_ROOT/obj/ggsnc/ggsnc %{_bindir}/ %files /usr/bin/ggsnc
I think I see the misunderstanding. Perhaps it will help you if I point out that "buildroot" is a very badly chosen word. It should have been called "installroot". The buildroot is not where the build takes place, it's a staging directory that you install into. That "chroot" or "root simulated environment" you're asking for, that's what the buildroot is.
In other words, you shouldn't try to copy files *from* the buildroot, you should copy them *to* the buildroot.
Use these spec file fragments:
# Define a temporary installation root. BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%install # Make an empty installation root. rm -rf %{buildroot} mkdir -p %{buildroot} # Make directories in the installation root. mkdir -p %{buildroot}%{_bindir} # Copy files to the installation root. cp obj/ggsnc/ggsnc %{buildroot}%{_bindir}
%files %{_bindir}/ggsnc
Be sure to note carefully where I have used "%{buildroot}" in the code above, and where I have not used it.
(It doesn't matter much whether you use "%{buildroot}" (an RPM macro) or "$RPM_BUILD_ROOT" (a shell variable). I prefer the RPM macro because I think it makes the spec file more readable.)
By the way, please don't reply to another message unless the message you're writing is actually a reply to that message. This thread is shown as replies to a question from Mihamina Rakotomandimby that it actually has nothing to do with.
Björn Persson
Björn, Thank you so much, that was it. and now:
rpm -pql /home/kahmed/rpmbuild/RPMS/i386/pcore-0.1-Beta.i386.rpm /usr/bin/ggsnc /usr/share/doc/pcore-0.1 /usr/share/doc/pcore-0.1/NEWS
Thanks, -Kamal.
From: Björn Persson <bjorn@rombobjörn.se> To: Kamal Ahmed kamal2222ahmed@yahoo.com; Discussion of RPM packaging standards and practices for Fedora packaging@lists.fedoraproject.org Sent: Sunday, April 15, 2012 5:59 PM Subject: what a buildroot is
Kamal Ahmed wrote:
Name: foo ... BuildRoot: /tmp/%{name} %prep ... %build ... %install install -m755 $RPM_BUILD_ROOT/obj/ggsnc/ggsnc %{_bindir}/ %files /usr/bin/ggsnc
I think I see the misunderstanding. Perhaps it will help you if I point out that "buildroot" is a very badly chosen word. It should have been called "installroot". The buildroot is not where the build takes place, it's a staging directory that you install into. That "chroot" or "root simulated environment" you're asking for, that's what the buildroot is.
In other words, you shouldn't try to copy files *from* the buildroot, you should copy them *to* the buildroot.
Use these spec file fragments:
# Define a temporary installation root. BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%install # Make an empty installation root. rm -rf %{buildroot} mkdir -p %{buildroot} # Make directories in the installation root. mkdir -p %{buildroot}%{_bindir} # Copy files to the installation root. cp obj/ggsnc/ggsnc %{buildroot}%{_bindir}
%files %{_bindir}/ggsnc
Be sure to note carefully where I have used "%{buildroot}" in the code above, and where I have not used it.
(It doesn't matter much whether you use "%{buildroot}" (an RPM macro) or "$RPM_BUILD_ROOT" (a shell variable). I prefer the RPM macro because I think it makes the spec file more readable.)
By the way, please don't reply to another message unless the message you're writing is actually a reply to that message. This thread is shown as replies to a question from Mihamina Rakotomandimby that it actually has nothing to do with.
Björn Persson
packaging@lists.fedoraproject.org