Re: [ilugd] error witth rpmbuild

2011-11-28 Thread Karanbir Singh
On 11/23/2011 04:07 AM, PANKAJ KUMAR wrote:
 %define _topdir/root/net-snmp
 %define name   net-snmp
 %define version5.6.1.1
 Name:  %{name}

is that really the entire spec file ? you are missing lots of things.. a
%files section would be good to get going. Take a look at this :
https://nazar.karan.org/cgit/net-snmp/tree/net-snmp.spec its a sample
net-snmp spec file you can use as a template and fix as you need.

I suspect 5.6 will shoe-horn in fairly cleanly into that.

on the other hand, you might want to consider using fpm, its a wrapper
around rpmbuild - and its meant to be a a very very basic inplace rpm
build tool. Its almost never the right or the best long term solution,
but if you need something in a hurry, and dont know what you are doing
in terms of systems management or rpm's; its something which might be
handy : https://github.com/jordansissel/fpm/wiki just keep in mind that
it does *no* sanity testing, you get to keep and then fix/livewith all
the broken bits.

- KB

___
Ilugd mailing list
Ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd


Re: [ilugd] error witth rpmbuild

2011-11-22 Thread Ashish SHUKLA
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

PANKAJ KUMAR writes:
 I'm trying to pack a software intp rpm. I have the source code.
 I have source code net-snmp-5.6.1.1.tar.gz
 I used the following commands...
 cd ~
 mkdir net-snmp
 cd net-snmp
 then i made directories SPECS, SRPMS, SOURCES, RPMS, BUILD
 then i copied my source code into SOURCES directory. and put my spec file in 
 SPECS directory. This is my net-snmp.spec file.

Unless you really intend to learn RPM packaging, I recommend searching for RPM
or SRPM for your corresponding distribution from rpmfind.net (a good RPM
mirror).

There are some problems with .spec file:

 ##

 %define _topdir    /root/net-snmp

1. You should not be using 'root' user to build RPMs.

 %define name   net-snmp
 %define version    5.6.1.1
 Name:  %{name}
 Version: %{version}
 Release: 1
 License: GPL
 Group: Applications/System
 Source: net-snmp-5.6.1.1.tar.gz
 %define buildroot %{_topdir}/%{name}-%{version}-root
 BuildRoot: %{buildroot}
 Prefix: /usr
 Summary: SNMP, at its core, allows a management station to treat its network 
 as a distributed database of health and configuration information .
 %description
 This package was originally based on the CMU 2.1.2.1 snmp code.
 It has been greatly modified, restructured, enhanced and fixed.
 It hardly looks the same as anything that CMU has ever released.
 It was renamed from cmu-snmp to ucd-snmp in 1995 and later renamed from 
 ucd-snmp to net-snmp in November 2000.
 %prep
 %setup -q
 %build
 ./configure

2. I assume you want to install in /usr (as you define it in Prefix above)
   but default ./configure (i.e. without explicit --prefix argument)
   configures it for installation in /usr/local.

Without seeing rpmbuild output it's difficult to say what went wrong. Please
provide the distribution you're doing this on, and your rpmbuild output.

If by any chance, you're packaging for Red Hat or its derivatives, there is an
RPM packaging related document[1] on FedoraProject.org wiki.

References:
[1]  http://fedoraproject.org/wiki/How_to_create_an_RPM_package

HTH
- -- 
Ashish SHUKLA

“Digital files cannot be made uncopyable, any more than water can be
made not wet.” (Bruce Schneier, 2001-05-15)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (FreeBSD)

iQIcBAEBCgAGBQJOzHj/AAoJEMdGz6nnT6Sw7nkP/iV3Dy12H0Yjh0JynzhhUJfm
el8k09VBy21T7XpEADVGl0vkh9JeVqjOiuCHd6aNruKR5WeV66Zgf/HvZ+ZShmgU
qqKOxc0fBB+1so+6EHsVocWixdD4Dj1yIjAc66RIY4/VdKYTPIyZnWsnxSynh9v2
/KOJmHNzEWFM0FVWJAaIIA7rKMKAxa3EKxqh6fd5LEcMYMGl/7eFf+N+WMO8+9ZE
ToERtBQepzPaPDr1hkImPZ7aKByvyXtNNAPsSI5WUXEAEgjh8PXnbAET0AJuyq0Z
OMJdgTfWWo+NAuDbRTyHPqj4OvV4THDdw0OGdt3D6viOxRoKbgSo1YfF/6M1he4y
pwRsPDAwJd4cjN+hzXbDvV9ExzpXvumyf92GKAfxF3OZ/KSVfT36hoLVPyuEv+cn
OOiwJxKkeDxykl2BUiBwun84p93/JGe6IMiZGLRNJ7OfUTJMkxZGJt7AZ+owcozV
iIQ9A4HwLwUHWk4meotg7a9ucKA6l2/ZOOWcUjNZv/qyOKVcoSANKAeeNt5lUIXF
W4WdE+Em9HLpOrgsqOuQMo5sMMkxPMje6iW2nPI8QHHOL1Cryt1UO2/YuH3p/qws
hIpOBl9FmIQY8GDfnzijeKMNrSfLilqyEawglKFnCNi4zw79njVRyJYIESlJWsBq
0cAtcmQXAOJ8/g9lk9sE
=+gR3
-END PGP SIGNATURE-

___
Ilugd mailing list
Ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd