Hi Abou,

On 11-04-13 00:17, Abou Al Montacir wrote:
> Can you please take 2.6.0 branch head and upload. The other 2 items are
> just a typo in translation file and a fix suggested by release team
> themselves. I think we really conform to the freeze goals. However if
> you don't like these two fixes, please feel free to remove them.

I just uploaded with the patch for bug 704252. I didn't feel the other
two items appropriate at this moment.

It took me some more time than expected, because I had to fix two bugs
in your script:

1) You used dpkg-architecture -qDEB_BUILD_ARCH instead of
dpkg-architecture -qDEB_BUILD_GNU_CPU (you could simplify your rules
file as well with this).
2) Your "if ${1} = '--gen-control'" line failed on one file and also
failed when I was calling fixdeb with the wrong arguments.

Find the debdiff I applied to 2.6.0-7 attached.

Paul

diff -Nru fpc-2.6.0/debian/changelog fpc-2.6.0/debian/changelog
--- fpc-2.6.0/debian/changelog  2012-12-22 10:12:58.000000000 +0100
+++ fpc-2.6.0/debian/changelog  2013-04-12 20:56:16.000000000 +0200
@@ -1,3 +1,10 @@
+fpc (2.6.0-8) unstable; urgency=low
+
+  * Removed auto-generation of debian/control during build process as required
+    by policy. (Closes: Bug#704252)
+
+ -- Abou Al Montacir <abou.almonta...@sfr.fr>  Tue, 26 Mar 2013 09:54:00 +0100
+
 fpc (2.6.0-7) unstable; urgency=low
 
   * Proofread templates by debian-l10n-english list. (Closes: Bug#686038)
diff -Nru fpc-2.6.0/debian/fixdeb fpc-2.6.0/debian/fixdeb
--- fpc-2.6.0/debian/fixdeb     2012-11-28 08:00:37.000000000 +0100
+++ fpc-2.6.0/debian/fixdeb     2013-04-12 19:38:14.000000000 +0200
@@ -3,29 +3,53 @@
 # Create debian files from *.in files
 #
 
-#set -x
-if [ $# -lt 3 ]; then
-  echo 'Usage : fixdeb <path> <target> <ppcbin> [priority]'
-  echo '        <path>     = path to debian files'
-  echo '        <target>   = fpc target (i386-linux)'
-  echo '        <ppcbin>   = ppcXXX binary name (ppc386)'
-  echo '        [priority] = package priority in alternative system'
-  exit 1
-fi
+set -e
+
+usage()
+{
+       echo 'Usage : DEB_SUBST_<var1>=<val1> ... DEB_SUBST_<var1>=<val1> 
fixdeb [-sc|--gen-control] <file1.in> [file1.in] ... [filen.in]'
+       echo '  Changes environment variables with their values. The variables 
to be'
+       echo '  changed should be exported prefixed with DEB_SUBST_<name of the 
variable>'
+       echo '        --gen-control: do not skip generating control file, by 
default it will be ignored'
+       echo '        <files.in> = space separated list to debian files 
templates'
+       echo
+       echo '  List of defined variables'
+       set | grep '^DEB_SUBST_'
+       exit 1
+}
+
+true  ${DEB_SUBST_PACKAGEVERSION:=$(dpkg-parsechangelog | sed -ne's,^Version: 
\(.*\),\1,p')}
+true  ${DEB_SUBST_VERSION:=$(echo $DEB_SUBST_PACKAGEVERSION | sed 
-ne's,^\([0-9.]*\).*,\1,p')}
+true  ${DEB_SUBST_DEBVERSION:=$(echo $DEB_SUBST_PACKAGEVERSION | awk -F '-' '{ 
print $NF }')}
+true  ${DEB_SUBST_SVNPATH:=$(echo $DEB_SUBST_VERSION | awk -F '.' '{ print 
"release_"$1"_"$2"_"$3 }')}
+true  ${DEB_SUBST_UPSTREAM_VERSION:=$(echo ${DEB_SUBST_PACKAGEVERSION} | cut 
-f 1 -d -)}
+true  ${DEB_SUBST_UPSTREAM_MAIN_VERSION:=$(echo ${DEB_SUBST_UPSTREAM_VERSION} 
| sed -e 's/^\([0-9\.]*\).*/\1/')}
+true  ${DEB_SUBST_PACKAGESUFFIX:=-${DEB_SUBST_UPSTREAM_MAIN_VERSION}}
+true  ${DEB_SUBST_PRIORITY:=$(($(echo ${DEB_SUBST_VERSION}.0.0.0.0 | sed -e 
's@\([0-9]\)\+\.\([0-9]\)\+\.\([0-9]\+\)\.\([0-9]\+\).*@((\1*100+\2)*100+\3)*100+\4@')))}
+true  ${DEB_SUBST_TARGET:=$(dpkg-architecture 
-qDEB_BUILD_GNU_CPU)-$(dpkg-architecture -qDEB_BUILD_ARCH_OS)}
 
-DEB_SUBST_PACKAGEVERSION=`dpkg-parsechangelog | sed -ne's,^Version: 
\(.*\),\1,p'`
-DEB_SUBST_VERSION=`echo $DEB_SUBST_PACKAGEVERSION | sed 
-ne's,^\([0-9.]*\).*,\1,p'`
-DEB_SUBST_DEBVERSION=`echo $DEB_SUBST_PACKAGEVERSION | awk -F '-' '{ print $NF 
}'`
-DEB_SUBST_SVNPATH=`echo $DEB_SUBST_VERSION | awk -F '.' '{ print 
"release_"$1"_"$2"_"$3 }'`
-DEB_SUBST_TARGET="$2"
-DEB_SUBST_PPCBIN="$3"
-DEB_SUBST_PACKAGESUFFIX=${PACKAGESUFFIX}
-DEB_SUBST_PRIORITY=${4:-$(($(echo ${DEB_SUBST_VERSION}.0.0.0.0 | sed -e 
's@\([0-9]\)\+\.\([0-9]\)\+\.\([0-9]\+\)\.\([0-9]\+\).*@((\1*100+\2)*100+\3)*100+\4@')))}
+if [ "${1}" = "--gen-control" ]
+then
+       gen_control=true
+       shift
+else
+       gen_control=false
+fi
+if test $# -lt 1
+then
+       usage
+fi
 
-SUBST_CMD=`set | sed -n -e 's/^DEB_SUBST_\([A-Z_]\+\)=\(.*\)/-e 
s@\${\1}@\2@g/p'`
+echo 'List of defined variables'
+set | grep '^DEB_SUBST_'
+SUBST_CMD=$(set | sed -n -e 's/^DEB_SUBST_\([A-Z_]\+\)=\(.*\)/-e 
s@\${\1}@\2@g/p')
 
-for i in $1/*.in
+for i in $*
 do
-  j=`basename ${i} .in`
-  sed ${SUBST_CMD} ${i} > $1/${j/./${PACKAGESUFFIX}.}
+       f=$(basename ${i} .in)
+       if  ${gen_control} || test ${f} != 'control'
+       then
+               d=$(dirname ${i})
+               sed ${SUBST_CMD} ${i} > ${d}/${f/./${DEB_SUBST_PACKAGESUFFIX}.}
+       fi
 done
diff -Nru fpc-2.6.0/debian/rules fpc-2.6.0/debian/rules
--- fpc-2.6.0/debian/rules      2012-11-28 07:31:42.000000000 +0100
+++ fpc-2.6.0/debian/rules      2013-04-12 19:36:16.000000000 +0200
@@ -167,9 +167,11 @@
 #
 
 debian-files: debian-files-stamp
-debian-files-stamp:
+debian-files-stamp:debian/fixdeb
        @echo "--- Creating/fixing *.install files"
-       /bin/bash debian/fixdeb debian $(FPCTARGET) $(PPNEW)
+       DEB_SUBST_PACKAGESUFFIX=${PACKAGESUFFIX} \
+       DEB_SUBST_PPCBIN=${PPNEW} \
+       $< debian/*.in
        touch debian-files-stamp
 
 ###################
@@ -381,3 +383,6 @@
 
 get-orig-source:
        -uscan --upstream-version=0 --rename
+
+debian/control:debian/fixdeb
+       $< --gen-control *.in

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to