rpmbuild报error: Installed (but unpackaged) file(s) found的解决办法

我在打包时出错:

Processing files: php-debuginfo-5.3.10-1.x86_64
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/php-5.3.10-1.x86_64
error: Installed (but unpackaged) file(s) found:
   /.channels/.alias/pear.txt
   /.channels/.alias/pecl.txt
   /.channels/.alias/phpdocs.txt
   /.channels/__uri.reg
   /.channels/doc.php.net.reg
   /.channels/pear.php.net.reg
   /.channels/pecl.php.net.reg
   /.depdb
   /.depdblock
   /.filemap
   /.lock

RPM build errors:
    Installed (but unpackaged) file(s) found:
   /.channels/.alias/pear.txt
   /.channels/.alias/pecl.txt
   /.channels/.alias/phpdocs.txt
   /.channels/__uri.reg
   /.channels/doc.php.net.reg
   /.channels/pear.php.net.reg
   /.channels/pecl.php.net.reg
   /.depdb
   /.depdblock
   /.filemap
   /.lock

网上查询,解决办法有:

1. 

在/usr/lib/rpm/macros文件中有一个定义:

%_unpackaged_files_terminate_build 1

把1改为0只警告

2. 

make install后删除这些文件:

rm -rf %{buildroot}
make INSTALL_ROOT=%{buildroot} install

rm -rf %{buildroot}/.channels/.alias/pear.txt %{buildroot}/.channels/.alias/pecl.txt %{buildroot}/.channels/__uri.reg %{buildroot}/.channels/pear.php.net.reg %{buildroot}/.channels/pecl.php.net.reg %{buildroot}/.depdb %{buildroot}/.depdblock %{buildroot}/.filemap %{buildroot}/.lock 

3.

把这些文件加进去

%files

%dir %{_prefix}/.channels

%dir %{_prefix}/.channels/.alias/

%{_prefix}/.channels/.alias/pear.txt

rpmbuild在centos 5与centos 6用法的异同(转)

之前是在centos5上对软件进行rpm打包,今天需要在centos 6上打包,发现File not found: /root/rpmbuild/BUILDROOT/…的错误,看是centos 6中的rpmbuild topdir已经改变,为了能兼容centos 5的spec文件,需要对topdir进行修改:

打开/usr/lib/rpm/macros文件:

%_topdir                %{getenv:HOME}/rpmbuild

更改为:

%_topdir                %{_usrsrc}/redhat

另外还需要定义buildroot

在spec文件中的make install后面加上DESTDIR=%{buildroot},即:

make install DESTDIR=%{buildroot}

DESTDIR是Makefile文件中定义的一个安装路径的变量,根据实际情况修改,比如mysqlnginx的是DESTDIR,而php的是INSTALL_ROOT。

转载请注明《文章来源:http://www.centos.bz/2012/06/file-not-found-root-rpmbuild-buildroot/

双线双IP机房内核调优注意事项

在双线双IP机房,是在机房的三层交换机上做汇聚实现单网卡双IP的。

一般来说机房会给两个IP,一个电信,一个联通,但只需要配一个网关,通常为电信。

我们在这个环境内装完centos 5.x后,做内核调优,配置了如下参数:

# Enable IP spoofing protection, turn on source route verification
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.lo.rp_filter = 1
net.ipv4.conf.eth0.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1

应用后,发现联通IP不通了。把上面这些参数改成0后,就通了。

下次要注意,留着备忘。

Citrix NetScaler VPX 导入SSL的方法 续

上一篇博客Citrix NetScaler VPX 导入SSL的方法内讲的导入ssl还有些问题。

在有些firefox版本还是会提示证书有安全问题,经查是由于交叉根证书没有安装造成,如下图:

而正确的应该是:

解决办法:

从SSL颁发机构拿到的中级证书文件内,其实是有两个证书的,如:

—–BEGIN CERTIFICATE—–
MIIFiDCCA3CgAwIBAgIEGZ34ijANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJD
TjEqMCgGA1UEChMhV29TaWduIGVDb21tZXJjZSBTZXJ2aWNlcyBMaW1pdGVkMSow
KAYDVQQDEyFDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBvZiBXb1NpZ24wHhcNMDkw
ODA4MDEwMDAxWhcNMjQwODA4MDEwMDAxWjBfMQswCQYDVQQGEwJDTjEqMCgGA1UE
ChMhV29TaWduIGVDb21tZXJjZSBTZXJ2aWNlcyBMaW1pdGVkMSQwIgYDVQQDExtX
b1NpZ24gQ2xhc3MgMyBPViBTZXJ2ZXIgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQC8ib5hUVPIK5Z1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ZTbBrArzGJCc788HLoii7A
iQf36IYcs7D/IsWmZCskTvbCscPUGCbyZkab8jiXWO6vBcu9QvLVc2J6C6ipPu50
JeeoWO9Z639I7RrdunvODAh7ILGIBN9/fvLtgVqjaBifznU4MCGVNF1k4J5SKlD3
OiVTb9o56PO3vm9dlhIbsfHA72MOtatknE4o1Ueh0uQDS//2ahRWGwmHxc4jleIl
cMRQZ8LkKaGMEH971ztew9P8caHRB9HiElp0bCzX8Q2HIerDy+BGkEErI+ACxCDZ
7472dsnmZw0cJ8rB6aU98RFM/IujUkTwkDmUbPBIL8HpVJJmu1c1Hy9iOVWq8JO7
I7G0aFGJgS0Pu+xgHN7Z3MnkbpGvnG2EXhoTSI3B29rSf4ByEeJaMuMWC3Nem4xU
R8O5z2yIpE7Cs/oe0xRdbVquf6Fwrcok1k+I4RQzRA6RC+AvVq60kobu5D7iZanC
LagrUUFhIw7R3GtPHE1X51OwXWqTxACiCRnu5iwe0W80w2wH3BKRs7+dJhU1JHs2
274jjFM+IWuF+A==
—–END CERTIFICATE—–

前一段是中级证书,后一段是交叉根证书。

中级证书前面已经link过了,把后一段的交叉根证书复制出来,导入到Citrix NetScaler VPX内,再在中级证书上link刚导入的交叉根证书就好了。

再检查,发现显示已经有交叉根证书了。

firefox也正常。