Re: Building packages using RPMBUILD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thu, 16 Dec 2010, Bowie Bailey wrote:

To: centos@xxxxxxxxxx
From: Bowie Bailey <Bowie_Bailey@xxxxxxx>
Subject: Re:  Building packages using RPMBUILD

On 12/16/2010 3:20 PM, Nico Kadel-Garcia wrote:
On Thu, Dec 16, 2010 at 11:00 AM, Leonard den Ottolander
<leonard@xxxxxxxxxxxxxxxxx> wrote:
Hello Keith,

On Thu, 2010-12-16 at 15:08 +0000, Keith Roberts wrote:
[rpmbuilder@karsites sox]$ rpm -iv ./sox-12.18.1-1.src.rpm
error: cannot write to %sourcedir /usr/src/redhat/SOURCES
/usr/src/redhat and sub dirs are owned root.root. If you want to build
as a normal user (and you should!) you should fix the ownership of those
directories.
NO. Never do this.

Use a personal .rpmmacros file to reset your personal working
directories, so you can compile locally.

   %_topdir /home/username/rpm

Here are the steps I use:

   mkdir $HOME/rpm
   mkdir $HOME/rpm/SOURCES
   mkdir $HOME/rpm/SPECS
   mkdir $HOME/rpm/BUILD
   mkdir $HOME/rpm/SRPMS
   mkdir $HOME/rpm/RPMS
   mkdir $HOME/rpm/RPMS/i386
   echo "%_topdir    $HOME/rpm" >> $HOME/.rpmmacros

You may also want an x86_64 directory depending on what you are building.

I've done something similar now.

Here's what I have got so far:

[root@karsites rpmbuilder]# ls -la
total 60
drwx------ 10 rpmbuilder rpmbuilder 4096 Dec 16 17:54 .
drwxr-xr-x  5 root       root       4096 Dec 16 14:09 ..
-rw------- 1 rpmbuilder rpmbuilder 208 Dec 16 15:22 .bash_history -rw-r--r-- 1 rpmbuilder rpmbuilder 33 Jan 22 2009 .bash_logout -rw-r--r-- 1 rpmbuilder rpmbuilder 176 Jan 22 2009 .bash_profile -rw-r--r-- 1 rpmbuilder rpmbuilder 124 Jan 22 2009 .bashrc
drwxrwxr-x  2 rpmbuilder rpmbuilder 4096 Dec 16 14:11 BUILD
drwxr-xr-x  3 rpmbuilder rpmbuilder 4096 Aug 12  2002 .kde
drwxrwxr-x  2 rpmbuilder rpmbuilder 4096 Dec 16 15:21 .mc
drwxr-xr-x 4 rpmbuilder rpmbuilder 4096 Dec 9 23:44 .mozilla -rw-r--r-- 1 rpmbuilder rpmbuilder 34 Dec 16 17:54 .rpmmacros
drwxrwxr-x  9 rpmbuilder rpmbuilder 4096 Dec 16 17:51 RPMS
drwxrwxr-x 2 rpmbuilder rpmbuilder 4096 Dec 16 14:11 SOURCES
drwxrwxr-x  2 rpmbuilder rpmbuilder 4096 Dec 16 14:11 SPECS
drwxrwxr-x  2 rpmbuilder rpmbuilder 4096 Dec 16 14:11 SRPMS
[root@karsites rpmbuilder]#

and:

[root@karsites home]# tree -Af -a rpmbuilder
rpmbuilder
├── rpmbuilder/.bash_history
├── rpmbuilder/.bash_logout
├── rpmbuilder/.bash_profile
├── rpmbuilder/.bashrc
├── rpmbuilder/.kde
│   └── rpmbuilder/.kde/Autostart
│       └── rpmbuilder/.kde/Autostart/.directory
├── rpmbuilder/.mc
│   ├── rpmbuilder/.mc/Tree
│   ├── rpmbuilder/.mc/history
│   └── rpmbuilder/.mc/ini
├── rpmbuilder/.mozilla
│   ├── rpmbuilder/.mozilla/extensions
│   └── rpmbuilder/.mozilla/plugins
├── rpmbuilder/.rpmmacros
├── rpmbuilder/BUILD
├── rpmbuilder/RPMS
│  ├── rpmbuilder/RPMS/athlon
│  ├── rpmbuilder/RPMS/geode
│   ├── rpmbuilder/RPMS/i386
│   ├── rpmbuilder/RPMS/i486
│   ├── rpmbuilder/RPMS/i586
│  ├── rpmbuilder/RPMS/i686
│   └── rpmbuilder/RPMS/noarch
├── rpmbuilder/SOURCES
├── rpmbuilder/SP
└── rpmbuilder/SRPMS

18 directories, 9 files

I also did a directory comparison using Kdif3, on /usr/src/redhat and /home/rpmbuilder. Then made the directories structures for rpmbuilder the same as redhat's - plus my extra files of course.

Thanks for all the input so far.

Keith

--
In theory, theory and practice are the same;
in practice they are not.

This email was sent from my laptop with Centos 5.5
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux