Work on 3.1 packaging

This commit is contained in:
Laurent Destailleur
2011-07-31 17:14:02 +00:00
parent 9c1205cb31
commit ad581e7465
7 changed files with 42 additions and 33 deletions

View File

@@ -14,3 +14,5 @@ version-phpsane.txt
makepack-phpsane.conf
html
*.deb
*.dsc
*.tar.gz

View File

@@ -49,5 +49,5 @@ For first ITP submission of Dolibarr, bug id was 634783.
- Call for a mentor on ML debian-mentors to upload packages
- Once package is uploaded, following URL are available:
http://packages.qa.debian.org/package
http://packages.qa.debian.org/package.html
http://bugs.debian.org/package

View File

@@ -2,7 +2,7 @@
#----------------------------------------------------------------------------
# \file build/makepack-dolibarr.pl
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
# \version $Id: makepack-dolibarr.pl,v 1.124 2011/07/31 13:17:03 eldy Exp $
# \version $Id: makepack-dolibarr.pl,v 1.126 2011/07/31 17:14:03 eldy Exp $
# \author (c)2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
#----------------------------------------------------------------------------
@@ -48,7 +48,7 @@ if (-d "/usr/src/RPM") {
use vars qw/ $REVISION $VERSION /;
$REVISION='$Revision: 1.124 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
$REVISION='$Revision: 1.126 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
$VERSION="1.0 (build $REVISION)";
@@ -274,6 +274,10 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/barcode/php-barcode/fonts/Veranda*.ttf`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/fckeditor/fckeditor.py`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/mssql/README`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/mysql/README`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/pgsql/README`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/spec`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/licence`;
@@ -410,7 +414,8 @@ if ($nboftargetok) {
}
if ($target eq 'RPM') { # Linux only
$ARCH='i386';
#$ARCH='i386';
$ARCH='noarch';
if ($RPMDIR eq "") { $RPMDIR=$ENV{'HOME'}."/rpmbuild"; }
$newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/0/gi; # dev
@@ -435,6 +440,7 @@ if ($nboftargetok) {
print "Remove other files\n";
$ret=`rm -f $BUILDROOT/$FILENAMETGZ2/htdocs/includes/barcode/php-barcode/genbarcode/genbarcode`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/README`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/aps`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/deb`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/dmg`;
@@ -472,6 +478,10 @@ if ($nboftargetok) {
print "Move $RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm into $DESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm\n";
$cmd="mv \"$RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm\" \"$DESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm\"";
$ret=`$cmd`;
print "Move $RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm into $DESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm\n";
$cmd="mv \"$RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm\" \"$DESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm\"";
$ret=`$cmd`;
next;
}
@@ -675,7 +685,7 @@ if ($nboftargetok) {
$ret=`cp -f "$SOURCE/build/deb/compat" "$BUILDROOT/$PROJECT.tmp/debian/compat"`;
$ret=`cp -f "$SOURCE/build/deb/format" "$BUILDROOT/$PROJECT.tmp/debian/source/format"`;
$ret=`cp -fr "$SOURCE/build/deb/po" "$BUILDROOT/$PROJECT.tmp/debian/po"`;
$ret=`rm -fr "$SOURCE/build/deb/po/CVS"`;
$ret=`rm -fr "$BUILDROOT/$PROJECT.tmp/debian/po/CVS"`;
# Add files also required to build binary package with dpkg-buildpackages
$ret=`cp -f "$SOURCE/build/deb/config" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -f "$SOURCE/build/deb/postinst" "$BUILDROOT/$PROJECT.tmp/debian"`;
@@ -697,11 +707,14 @@ if ($nboftargetok) {
{
print "Move *_all.deb to $DESTI\n";
$ret=`mv $BUILDROOT/*_all.deb "$DESTI/"`;
$ret=`mv $BUILDROOT/*.dsc "$DESTI/"`;
$ret=`mv $BUILDROOT/*.tar.gz "$DESTI/"`;
}
else
{
print "Move *_all.deb to $DESTI\n";
$ret=`mv $BUILDROOT/*_all.deb "$DESTI/"`;
$ret=`mv $BUILDROOT/*.dsc "$DESTI/"`;
$ret=`mv $BUILDROOT/*.tar.gz "$DESTI/"`;
}
next;
}

View File

@@ -5,24 +5,15 @@ RPM Package tools
This directory contains files used by makepack-dolibarr.pl
script to build a package, ready to be distributed,
with format RPM (for Redhat, OpenSuse, Mandriva, ...).
with format RPM (for Redhat, Mandriva, ...).
# This is standard command to work on RPM packaging:
#
# yum -y install rpmlint
# yum -y install hunspell-en hunspell-es hunspell-fr hunspell-it
#
# rpmlint file.rpm Test a package
# mock -r fedora-15-i386 --rebuild ../SRPMS/hello-2.7-1.fc15.src.rpm
# This is standard command to work on Debian packaging:
#
# On Fedora
# rpm -i --test dolibarr-...rpm To list dependencies of RPM
# yum install dolibarr-...rpm To install package and dependencies
# yum erase dolibarr To remove package
# chcon -R -h -t httpd_sys_script_rw_t /file To add temporary context rw for httpd on /file
# semanage fcontext -a -t httpd_sys_script_rw_t "/dir/(.*)?" To add persistent context rw for httpd on /dir (this add file_contexts.local)
# restorecon -R -v /file Restore values into files (cancel chcon, validate semanage)
#
# On OpenSuse
# yast --install dolibarr-...rpm To install package and dependencies
@@ -36,22 +27,18 @@ with format RPM (for Redhat, OpenSuse, Mandriva, ...).
To submit a package to Fedora:
- Create account on bugzilla.redhat.com
- Create account on fedoraproject.org
- Create SRPMS package.
- Upload package onf http://fedorapeople.org
- Create a bug with form https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review
This is example of content of review field (used for Bug 723326):
SRPMS URL: http://www.dolibarr.org/files/fedora/dolibarr-x.y.z-xxx.src.rpm
Spec URL: http://www.dolibarr.org/files/fedora/dolibarr.spec
SRPM URL: http://www.dolibarr.org/files/fedora/dolibarr-3.1.0-0.src.rpm
Description: Dolibarr ERP & CRM is an easy to use open source/free software
for small and medium companies, foundations or freelances. It includes
different features for Enterprise Resource Planning (ERP) and Customer
Relationship Management (CRM) but also for different other activities.
I am author of other already packaged OpenSources packages (awstats) but this
is my first package to maintain myself. So i'm seeking a sponsor.
- Edit field "Block" and add FE-NEEDSPONSOR
- Check bug is into database by searching with id on https://bugzilla.redhat.com/
- Install fedora packager tools: yum install fedora-packager
- Setup fedora packagers tools: fedora-packager-setup
- Send your package: koji build --scratch f16 path_to_source_RPM
- Check if package is available: http://koji.fedoraproject.org/koji/

View File

@@ -20,7 +20,7 @@ Vendor: Dolibarr dev team
URL: http://www.%{name}.org
Source: /usr/src/RPM/SOURCES/%{name}-%{version}.tgz
#BuildArch: noarch
BuildArch: noarch
#BuildArchitectures: noarch
BuildRoot: /tmp/%{name}-buildroot
#Icon: dolibarr_logo1.gif
@@ -345,12 +345,19 @@ then
fi
# Removed dirs after apache restart
echo Removed remaining dirs
echo Removed remaining $apacheconfig
rm -f $apacheconfig
echo Removed remaining $config
rm -f $config
echo Removed remaining $installconfig
rm -f $installconfig
echo Removed remaining $lockfile
rm -f $lockfile
echo Removed remaining dir $targetdir/doc
rmdir $targetdir/doc >/dev/null 2>&1
rmdir $targetdir/htdocs >/dev/null 2>&1
#echo Removed remaining dir $targetdir/htdocs
#rmdir $targetdir/htdocs >/dev/null 2>&1 # Already removed by rpm
%changelog
* Wed Jul 31 2011 Laurent Destailleur 3.1.0
- Initial upstream (#723326)

View File

@@ -3,6 +3,7 @@ $force_install_noedit=2;
$force_install_message='KeepDefaultValuesDeb';
$force_install_main_data_root='/usr/share/dolibarr/documents';
$force_install_type='mysqli';
$force_install_dbserver='localhost';
$force_install_port='3306';
$force_install_database='dolibarrrpm';
$force_install_createdatabase='1';

View File

@@ -24,7 +24,7 @@
* \file htdocs/install/etape5.php
* \ingroup install
* \brief Last page of upgrade or install process
* \version $Id: etape5.php,v 1.105 2011/07/31 11:56:43 eldy Exp $
* \version $Id: etape5.php,v 1.106 2011/07/31 13:28:45 eldy Exp $
*/
include_once("./inc.php");
@@ -364,7 +364,6 @@ elseif (preg_match('/upgrade/i',$action))
if (! empty($force_install_lockinstall))
{
// Upgrade is finished, we create the lock file
$lockfile="../../install.lock";
$fp = @fopen($lockfile, "w");
if ($fp)
{