Debian Bug report logs - #442035
dh-make-php: patch to add pear registration in postinst

version graph

Package: dh-make-php; Maintainer for dh-make-php is (unknown);

Reported by: mah@everybody.org (Mark A. Hershberger)

Date: Wed, 12 Sep 2007 17:21:01 UTC

Severity: normal

Found in version 0.2.6.1

Fixed in version dh-make-php/0.2.7

Done: Uwe Steinmann <steinm@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Mark A. Hershberger <mhershberger@intrahealth.org>, pkg-php-maint@lists.alioth.debian.org, Uwe Steinmann <steinm@debian.org>:
Bug#442035; Package dh-make-php. (full text, mbox, link).


Acknowledgement sent to mah@everybody.org (Mark A. Hershberger):
New Bug report received and forwarded. Copy sent to Mark A. Hershberger <mhershberger@intrahealth.org>, pkg-php-maint@lists.alioth.debian.org, Uwe Steinmann <steinm@debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: mah@everybody.org (Mark A. Hershberger)
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dh-make-php: patch to add pear registration in postinst
Date: Wed, 12 Sep 2007 13:18:02 -0400
Package: dh-make-php
Version: 0.2.6.1
Severity: normal

Attached, I've included a patch that will add PEAR registration to the
postinst packages automatically.

I've used this successfully for my packages in #441637, #441642,
#441643, #441644, #441648, and #441651.

-- System Information:
Debian Release: lenny/sid
  APT prefers gutsy-updates
  APT policy: (500, 'gutsy-updates'), (500, 'gutsy-security'), (500, 'gutsy-backports'), (500, 'gutsy')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-11-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dh-make-php depends on:
ii  cdbs                      0.4.49ubuntu2  common build system for Debian pac
ii  php-pear                  1:1.6.1-1      PEAR Base System
ii  php5-cli                  5.2.3-1ubuntu5 command-line interpreter for the p

dh-make-php recommends no packages.

-- no debconf information

=== added file 'pear.template/postinst'
--- pear.template/postinst	1970-01-01 00:00:00 +0000
+++ pear.template/postinst	2007-08-30 20:26:42 +0000
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ -f /usr/share/doc/##packagename##/package.xml -a -x /usr/bin/pear ]; then
+    cd /usr/share/doc/##packagename##
+    /usr/bin/pear install -r -n package.xml
+fi

=== added file 'pear.template/prerm'
--- pear.template/prerm	1970-01-01 00:00:00 +0000
+++ pear.template/prerm	2007-08-30 20:36:50 +0000
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+if [ -x /usr/bin/pear ]; then
+    /usr/bin/pear uninstall -r -n ##pearpkgname##
+fi

=== modified file 'debian/changelog'
--- debian/changelog	2007-08-30 17:54:12 +0000
+++ debian/changelog	2007-08-30 17:58:29 +0000
@@ -1,3 +1,9 @@
+dh-make-php (0.2.6.1) unstable; urgency=low
+
+  * Add postinst, prerm scripts.  Keep package.xml in docs for use.  Update watch template.
+
+ -- Mark A. Hershberger <mah@everybody.org>  Thu, 30 Aug 2007 13:58:29 -0400
+
 dh-make-php (0.2.6) unstable; urgency=low
 
   * Use -P instead of -R in pear.mk when calling 'pear install'

=== modified file 'dh-make-pear'
--- dh-make-pear	2007-08-30 17:54:12 +0000
+++ dh-make-pear	2007-08-30 20:37:02 +0000
@@ -174,3 +174,10 @@
 sed -e "s/##pearpkgname##/${PHP_PKG_NAME}/g" \
 		${DEBTEMPDIR}/watch > ${SRCPACKAGEDIR}/debian/watch
 
+sed -e "s/##packagename##/${DEBPACKAGEPREFIX}-${PHP_PKG_LOWNAME}/g" \
+		${DEBTEMPDIR}/postinst > ${SRCPACKAGEDIR}/debian/postinst
+chmod 755 ${SRCPACKAGEDIR}/debian/postinst
+
+sed -e "s/##pearpkgname##/${PHP_PKG_NAME}/g" \
+		${DEBTEMPDIR}/prerm > ${SRCPACKAGEDIR}/debian/prerm
+chmod 755 ${SRCPACKAGEDIR}/debian/prerm

=== modified file 'pear.mk'
--- pear.mk	2007-08-30 17:54:12 +0000
+++ pear.mk	2007-08-30 17:46:42 +0000
@@ -64,6 +64,7 @@
 
 	# move documentation to correct location
 	mkdir -p $(DEB_DESTDIR)$(PEAR_NEW_DOC_DIR)
+	cp package.xml $(DEB_DESTDIR)$(PEAR_NEW_DOC_DIR)
 	if [ -d $(DEB_DESTDIR)$(PEAR_OLD_DOC_DIR) ] ; then \
 		mv -i $(DEB_DESTDIR)$(PEAR_OLD_DOC_DIR)/* $(DEB_DESTDIR)$(PEAR_NEW_DOC_DIR); \
 		rmdir $(DEB_DESTDIR)$(PEAR_OLD_DOC_DIR); \

=== modified file 'pear.template/rules'
--- pear.template/rules	2007-08-30 17:54:12 +0000
+++ pear.template/rules	2007-08-30 19:47:58 +0000
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 # template debian/rules provided by dh-make-php.
 
+DEB_COMPRESS_EXCLUDE=package.xml
+
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/pear.mk

=== modified file 'pear.template/watch'
--- pear.template/watch	2007-08-30 17:54:12 +0000
+++ pear.template/watch	2007-08-30 17:42:17 +0000
@@ -1,2 +1,2 @@
 version=3
-http://pear.php.net/package/##pearpkgname##/download /get/##pearpkgname##-([\d.]+)\.tgz debian uupdate
+http://pear.php.net/package/##pearpkgname##/download http://download.pear.php.net/package/##pearpkgname##-([\d.]+)\.tgz





Information forwarded to debian-bugs-dist@lists.debian.org, Uwe Steinmann <steinm@debian.org>:
Bug#442035; Package dh-make-php. (full text, mbox, link).


Acknowledgement sent to mah@everybody.org (Mark A. Hershberger):
Extra info received and forwarded to list. Copy sent to Uwe Steinmann <steinm@debian.org>. (full text, mbox, link).


Message #10 received at 442035@bugs.debian.org (full text, mbox, reply):

From: mah@everybody.org (Mark A. Hershberger)
To: 442035@bugs.debian.org
Subject: updated patch
Date: Thu, 13 Sep 2007 17:30:11 -0400
[Message part 1 (text/plain, inline)]
I've fixed up the postinst and prerm and created a new patch.

[tmp.diff (text/x-diff, inline)]
=== added file 'pear.template/postinst'
--- pear.template/postinst	1970-01-01 00:00:00 +0000
+++ pear.template/postinst	2007-09-13 21:25:10 +0000
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    configure)
+        if [ -f /usr/share/doc/##packagename##/package.xml -a -x /usr/bin/pear ]; then
+            cd /usr/share/doc/##packagename##
+            /usr/bin/pear install -r -n package.xml
+        fi
+        ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+        ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+        ;;
+esac
+
+
+#DEBHELPER#
+
+exit 0

=== added file 'pear.template/prerm'
--- pear.template/prerm	1970-01-01 00:00:00 +0000
+++ pear.template/prerm	2007-09-13 21:25:53 +0000
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    remove|upgrade|deconfigure)
+        if [ -x /usr/bin/pear ]; then
+            /usr/bin/pear uninstall -r -n ##pearpkgname##
+        fi
+        ;;
+
+    failed-upgrade)
+        ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+        ;;
+esac
+
+#DEBHELPER#
+
+exit 0

=== modified file 'debian/changelog'
--- debian/changelog	2007-08-30 17:54:12 +0000
+++ debian/changelog	2007-09-13 21:27:21 +0000
@@ -1,3 +1,10 @@
+dh-make-php (0.2.6.1) unstable; urgency=low
+
+  * Add postinst, prerm scripts.  Keep package.xml in docs for use.
+    Update watch template.
+
+ -- Mark A. Hershberger <mah@everybody.org>  Thu, 30 Aug 2007 13:58:29 -0400
+
 dh-make-php (0.2.6) unstable; urgency=low
 
   * Use -P instead of -R in pear.mk when calling 'pear install'

=== modified file 'dh-make-pear'
--- dh-make-pear	2007-08-30 17:54:12 +0000
+++ dh-make-pear	2007-08-30 20:37:02 +0000
@@ -174,3 +174,10 @@
 sed -e "s/##pearpkgname##/${PHP_PKG_NAME}/g" \
 		${DEBTEMPDIR}/watch > ${SRCPACKAGEDIR}/debian/watch
 
+sed -e "s/##packagename##/${DEBPACKAGEPREFIX}-${PHP_PKG_LOWNAME}/g" \
+		${DEBTEMPDIR}/postinst > ${SRCPACKAGEDIR}/debian/postinst
+chmod 755 ${SRCPACKAGEDIR}/debian/postinst
+
+sed -e "s/##pearpkgname##/${PHP_PKG_NAME}/g" \
+		${DEBTEMPDIR}/prerm > ${SRCPACKAGEDIR}/debian/prerm
+chmod 755 ${SRCPACKAGEDIR}/debian/prerm

=== modified file 'pear.mk'
--- pear.mk	2007-08-30 17:54:12 +0000
+++ pear.mk	2007-08-30 17:46:42 +0000
@@ -64,6 +64,7 @@
 
 	# move documentation to correct location
 	mkdir -p $(DEB_DESTDIR)$(PEAR_NEW_DOC_DIR)
+	cp package.xml $(DEB_DESTDIR)$(PEAR_NEW_DOC_DIR)
 	if [ -d $(DEB_DESTDIR)$(PEAR_OLD_DOC_DIR) ] ; then \
 		mv -i $(DEB_DESTDIR)$(PEAR_OLD_DOC_DIR)/* $(DEB_DESTDIR)$(PEAR_NEW_DOC_DIR); \
 		rmdir $(DEB_DESTDIR)$(PEAR_OLD_DOC_DIR); \

=== modified file 'pear.template/rules'
--- pear.template/rules	2007-08-30 17:54:12 +0000
+++ pear.template/rules	2007-08-30 19:47:58 +0000
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 # template debian/rules provided by dh-make-php.
 
+DEB_COMPRESS_EXCLUDE=package.xml
+
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/pear.mk

=== modified file 'pear.template/watch'
--- pear.template/watch	2007-08-30 17:54:12 +0000
+++ pear.template/watch	2007-08-30 17:42:17 +0000
@@ -1,2 +1,2 @@
 version=3
-http://pear.php.net/package/##pearpkgname##/download /get/##pearpkgname##-([\d.]+)\.tgz debian uupdate
+http://pear.php.net/package/##pearpkgname##/download http://download.pear.php.net/package/##pearpkgname##-([\d.]+)\.tgz


Reply sent to Uwe Steinmann <steinm@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to mah@everybody.org (Mark A. Hershberger):
Bug acknowledged by developer. (full text, mbox, link).


Message #15 received at 442035-close@bugs.debian.org (full text, mbox, reply):

From: Uwe Steinmann <steinm@debian.org>
To: 442035-close@bugs.debian.org
Subject: Bug#442035: fixed in dh-make-php 0.2.7
Date: Tue, 18 Sep 2007 06:32:04 +0000
Source: dh-make-php
Source-Version: 0.2.7

We believe that the bug you reported is fixed in the latest version of
dh-make-php, which is due to be installed in the Debian FTP archive:

dh-make-php_0.2.7.dsc
  to pool/main/d/dh-make-php/dh-make-php_0.2.7.dsc
dh-make-php_0.2.7.tar.gz
  to pool/main/d/dh-make-php/dh-make-php_0.2.7.tar.gz
dh-make-php_0.2.7_all.deb
  to pool/main/d/dh-make-php/dh-make-php_0.2.7_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 442035@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Uwe Steinmann <steinm@debian.org> (supplier of updated dh-make-php package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 17 Sep 2007 11:12:42 +0200
Source: dh-make-php
Binary: dh-make-php
Architecture: source all
Version: 0.2.7
Distribution: unstable
Urgency: low
Maintainer: Uwe Steinmann <steinm@debian.org>
Changed-By: Uwe Steinmann <steinm@debian.org>
Description: 
 dh-make-php - Creates Debian source packages for PHP PEAR and PECL extensions
Closes: 442035 442309
Changes: 
 dh-make-php (0.2.7) unstable; urgency=low
 .
   * Replaced PHP license 3.0 with 3.01 (Closes: #442309)
   * Add postinst, prerm scripts.  Keep package.xml in docs for use.
     Update watch template (patch provided by Mark A. Hershberger
     <mah@everybody.org>) (Closes: #442035)
   * updated url in watch file (another fix by Mark A. Hershberger)
Files: 
 5f065be78955a3aeb2ffd2e830c6353d 594 web optional dh-make-php_0.2.7.dsc
 6ee6f8c8fb686b81cd00afd203ce9be8 31337 web optional dh-make-php_0.2.7.tar.gz
 376be2f688474e09447baa9baec30c16 30728 web optional dh-make-php_0.2.7_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG72zZih2Zvw18pwERAq/nAKCbe94EgtNsgDERg17CejKNLN690QCdGSZ/
rFj+eM0H4tgewBpnCTyYFB8=
=X7oB
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 16 Oct 2007 07:27:27 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 02:09:19 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.