drl57959 2013-08-18 01:53 采纳率: 0%
浏览 66
已采纳

用不同的前缀重新编译dotdeb php

Achivements:

  • Having 2+ versions (5.3, 5.4, 5.5) of PHP on 1 server installed via aptitude

  • Runninng php as fastcgi - this is working well, tested with 2 versions of php on 1 server

  • Using dotdeb version of php

  • Having own repository with php (because of repeatable build of server) - tested and working well

Building PHP from dotdeb:

I have a simple script to download latest version from dotdeb and create new package, which is working perfectly and I would like to modify it:

#!/bin/bash
cd /tmp

PACKAGE=php5
VERSION=`apt-cache show ${PACKAGE} | grep 'Version:' | head -1 | awk -F" |-" '{print $2}'` || exit 1

apt-get update || exit 1
apt-get build-dep ${PACKAGE} || exit 1
apt-get source ${PACKAGE} || exit 1

cd ${PACKAGE}-${VERSION} || exit 1

dch -n "Rebuilt with different package name and paths."

dpkg-buildpackage -b -rfakeroot || exit 1

If I run this script just like this, everything is working fine and right .deb packages are producted.

What I need:

  • Modify script to rename package from php5 to php53/php54/php55 to avoid conflicts in repository

  • Change path where new package is going to be installed to avoid conflicts with other versions of php ... something like /usr/local/php53/..., /usr/local/php54/

Test 1 - changing the name of package

sed -e 's/php5/php54/g' -i debian/control

Packaged was compiled correctly, I hope. The only issue are failing php unit tests, which scares me.

You can see a part of output: http://pastebin.com/4zUqxx4z

Test 2 - adding prefix

--- debian/rules      2013-08-17 22:06:17.502911115 +0000
+++ debian/rules       2013-08-17 22:05:44.000000000 +0000
@@ -103,6 +103,7 @@

 COMMON_CONFIG=--build=$(DEB_BUILD_GNU_TYPE) \
                --host=$(DEB_HOST_GNU_TYPE) \
+               --prefix=/usr/local/php54 \
                --sysconfdir=/etc \
                --localstatedir=/var \
                --mandir=/usr/share/man \

Will output: http://pastebin.com/q2pXUnkF ... basicaly, PEAR instalation can't find some files.

  • 写回答

1条回答 默认 最新

  • dongtu7205 2013-08-28 08:16
    关注

    The solution is update whole debian/rules, rename files in debian directory related to each package and update debian/control.

    There is nothing needed to be updated out of debian directory.

    Unfortunately, changing php5 to php54 in every file (or filename) in debian doesn't work :\

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 Python安装cvxpy库出问题
  • ¥15 用前端向数据库插入数据,通过debug发现数据能走到后端,但是放行之后就会提示错误
  • ¥15 python天天向上类似问题,但没有清零
  • ¥30 3天&7天&&15天&销量如何统计同一行
  • ¥30 帮我写一段可以读取LD2450数据并计算距离的Arduino代码
  • ¥15 C#调用python代码(python带有库)
  • ¥15 矩阵加法的规则是两个矩阵中对应位置的数的绝对值进行加和
  • ¥15 活动选择题。最多可以参加几个项目?
  • ¥15 飞机曲面部件如机翼,壁板等具体的孔位模型
  • ¥15 vs2019中数据导出问题