Chinaunix首页 | 论坛 | 博客
  • 博客访问: 281617
  • 博文数量: 56
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 642
  • 用 户 组: 普通用户
  • 注册时间: 2013-12-16 15:11
文章分类

全部博文(56)

文章存档

2017年(6)

2015年(3)

2014年(41)

2013年(6)

我的朋友

分类: LINUX

2014-02-20 18:01:01

1. 使用rpmbuild
添加mockbuild用户和组
# groupadd mockbuild
# useradd -gmockbuild mockbuild
# cat /etc/passwd
# cat /etc/group

安装rpm-build
# yum install rpm-build*

准备环境(安装build所需包)
#yum install libblkid-devel autoconf automake gettext-devel libtool python-devel python-devel libxml2-devel xhtml1-dtds readline-devel ncurses-devel libtasn1-devel gnutls-devel augeas libudev-devel libpciaccess-devel yajl-devel sanlock-devel libpcap-devel libnl-devel avahi-devel libselinux-devel cyrus-sasl-devel parted-devel device-mapper-devel numactl-devel libcap-ng-devel netcf-devel libcurl-devel audit-libs-devel systemtap-sdt-devel libattr-devel libnl3-devel fuse-devel dbus-devel polkit-devel

开始build
方法一:
# rpmbuild --rebuild ****.src.rpm

方法二:
Generate the spec file
#rpmbuild -bp /root/rpmbuild/SPECS/libvirt.spec

Modify the code, The following was the code path
#cd rpmbuild/BUILD/libvirt-0.10.2/

re-compile the code
# cd rpmbuild/BUILD/libvirt-0.10.2/
# pwd
/root/rpmbuild/BUILD/libvirt-0.10.2
# ./autogen.sh --system

# make
# make check

2. 使用git repo里自带的autogen
连接下载远程git repo
# git clone git://git.app.eng.bos.redhat.com/libvirt-rhel.git

查看本地branch
# git branch
 next-6.5
* rhel7                                                 ====================》当前工作的branch

git clone会下载远程repo正在工作的branch到本地,如果这不是你需要的,或者你想要下载其它远程branch,用下面方法:
# git branch -r                                 =======================> 查看远程repo中的所有branch
# git checkout -b rhel7 origin/next-7.0            ===============》加载next-7.0 到本地

build libvirt
# ./autogen.sh --system --without-udev --without-storage-mpath --without-storage-disk --without-macvtap





阅读(1425) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~