Skip to content

Commit

Permalink
Imported Debian patch 4.5.3-1~naesten1
Browse files Browse the repository at this point in the history
  • Loading branch information
SamB committed Feb 8, 2012
2 parents d648976 + 994d251 commit efae923
Show file tree
Hide file tree
Showing 97 changed files with 13,903 additions and 7,024 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions debian/Makefile
Expand Up @@ -12,8 +12,8 @@ M = $(M1)
MANS = $(M:%=%-$(VER).1)
PODS = $(M:%=%.pod)

VER = 4.4
FULLVER = 4.4.4
VER = 4.5
FULLVER = 4.5.3

GCCVERS = gcc/doc/gcc-vers.texi

Expand All @@ -34,7 +34,7 @@ MKINFO_FLAGS := --no-split -Igcc/doc -Igcc/doc/include
MKINFO = makeinfo $(MKINFO_DEFINES) $(MKINFO_FLAGS)

TEXI2POD_DEFINES := -Dfngccint=gccint-$(VER) -DBUGURL=http://bugs.debian.org/
TEXI2POD = perl ../../texi2pod.pl $(TEXI2POD_DEFINES)
TEXI2POD = perl ../../contrib/texi2pod.pl $(TEXI2POD_DEFINES)

all : $(TARGETS)

Expand Down
79 changes: 52 additions & 27 deletions debian/README.source
@@ -1,29 +1,29 @@
This package provides documentation for debian GNU Compiler Collenction
This package provides documentation for Debian's GNU Compiler Collection
packages.

Problem is the documentation is GFDL-licensed, and does contain invariant
sections. This makes the documentation files undistributable by Debian.

These files have beed extracted from gcc upstream tarball by hand, and packed
together into gcc-X.Y-doc-non-dfsg .orig.tar.gz file. This work has to be
redone for every new upstream release.

Policy is to have only unmodified upstream files in .orig.tar.gz file.
Everything else is added in the debian source package files.

The .orig.tar.gz file is generated by a Python script which basically
greps through the upstream tarball for the documentation sources. This
has to be redone for *every* new upstream release.

The debian gcc-X.Y-doc-non-dfsg debian package adds a Makefile and debian
packaging files to that 'upstream' archive. Also, it applies several patches
on the 'upstream' files, for two reasons:
- since debian gcc differs from upstream gcc, some changes into documentation
are needed as well,
- sometimes additional patching is required to make documentation build from
on the 'upstream' files, for several reasons:
- Since Debian routinely carries multiple versions of GCC simultaneously,
we rename the .info files so that they can coexist as well, which requires
that cross-references be adjusted accordingly.
- Since Debian GCC differs from upstream GCC, some changes to documentation
are needed as well.
- Sometimes additional patching is required to make documentation build from
source.

When moving to new 'upstream' version, don't forget to update VER and FULLVER
Makefile variables.

Patches are managed by 'dpatch' system.
See /usr/share/doc/dpatch/README.source.gz (provided by dpatchpackage since
See /usr/share/doc/dpatch/README.source.gz (provided by dpatch package since
version 2.0.30) for more information on how to work with dpatch-using debian
source packages.

Expand All @@ -39,27 +39,52 @@ be applied before from-debian-gcc-* patches), or zNN (if it should be applied
after from-debian-gcc-* patches). Also better not to touch from-debian-gcc-*
patches by hand and use debian/convert-debian-gcc-diff script instead.

Updating .orig.tar.gz to new upstream release includes the following steps:
- update existing .texi files from gcc/doc/, gcc/ada/, gcc/fortran/,
gcc/java/, and libiberty/,
- update *.7 manual pages from gcc/doc (those go unmodified to gcc-doc-base
package to match licensing requirements),
- update contrib/texi2pod.pl script (it is used by documentation build)
- try to build and add any possible new referenced .texi files.
Updating to a new upstream release includes the following steps:
- Generate the new .orig.tar.gz from the upstream tarball using the
debian/extract-doc-tarball-from-upstream script, which takes care of
the following:
- update existing .texi files from gcc/doc/, gcc/ada/, gcc/fortran/,
gcc/java/, and libiberty/,
- update *.7 manual pages from gcc/doc (those go unmodified to gcc-doc-base
package to match licensing requirements),
- update contrib/texi2pod.pl script (it is used by documentation build).
(In fact, the script just grabs all .texi and .7 files in the gcc/
subtree, along with the one .texi from libibirty/ and contrib/texi2pod.pl.)
- Unpack the new .orig.tar.gz.
- Copy the (cleaned) debian/ tree over from the previous package, or
apply the previous .diff.gz to the new tree.
- Update debian/Makefile to build any newly-referenced documents,
and the various <package>.{docs,doc-base.*,info,links,manpages}
files to install and register them appropriately.
- Update VER and FULLVER in debian/Makefile.
- Also follow the instructions below for syncing with a new Debian package release.

Syncing against new debian package release includes the following steps:
- check what texi files are modified by patches from debian gcc source
If updating to a new X.Y release, you must also:
- rename all packages in debian/control whose names should contain X.Y,
- rename the <package>.<FOO> files to match,
- edit the <package>.<FOO> files to use the new version number, keeping
in mind that:
- the .manpages line for GCC's manpage should be gcc-X.Y.1, not
X.Y.Z; the last number is the section number for the manpage,
- add a new entry to debian/changelog with the new source package name
before even *thinking* about building!

Syncing against a new Debian package release includes the following steps:
- check what .texi files are modified by patches from debian gcc source
package; don't forget that:
- if .texi modification is in the same patch file as other modifications,
it will be commented out (because .texi files are not there in debian
version of gcc source) - however uncommenting will be handled by
debian/convert-debian-gcc-diff script
- not all patches from debian/patches/ are applied to debian packages,
have to check build scripts to find out what is applied and what is not
(also this information is included in
/usr/share/doc/gcc-X.Y-base/README.Debian.gz file provided by gcc-X.Y-base
package),
- construct new debian/convert-debian-gcc-diff command line and execute it,
- replace saved debian/convert-debian-gcc-diff command line with a new one,
(some of this information is included in
/usr/share/doc/gcc-X.Y-base/README.Debian.<arch>.gz file provided by the
gcc-X.Y-base package, but this will miss architecture-specific patches that
don't apply to the <arch> architecture),
- construct a new debian/convert-debian-gcc-diff command line and execute it,
- replace saved debian/convert-debian-gcc-diff command line with the new one,
- check that package builds without any warnings! if not, find out what's
wrong and fix it.

-- Samuel Bronson <naesten@gmail.com>, Tue, 17 Jan 2012 15:27:17 -0500
10 changes: 10 additions & 0 deletions debian/changelog
@@ -1,3 +1,13 @@
gcc-4.5-doc-non-dfsg (4.5.3-1~naesten1) unstable; urgency=low

* Packaged documentation for gcc, gnat, and gcj version 4.5.3.
* Use new script debian/extract-doc-tarball-from-upstream to generate
.orig.tar.gz file.
+ Move texi2pod.pl to contrib/texi2pod.pl, where it appears upstream,
to avoid having to special-case it.

-- Samuel Bronson <naesten@gmail.com> Mon, 16 Jan 2012 16:54:25 -0500

gcc-4.4-doc-non-dfsg (4.4.4.nf1-1) unstable; urgency=low

* Packaged documentation files for gcc, gnat and gcj version 4.4.4.
Expand Down
14 changes: 7 additions & 7 deletions debian/control
@@ -1,4 +1,4 @@
Source: gcc-4.4-doc-non-dfsg
Source: gcc-4.5-doc-non-dfsg
Section: non-free/doc
Priority: optional
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Expand All @@ -18,7 +18,7 @@ Description: several GNU manual pages
which should be available together with gcc man pages to fit
GNU Free Documentation License requirements.

Package: gcc-4.4-doc
Package: gcc-4.5-doc
Architecture: all
Depends: gcc-doc-base (>= 4.1.1.nf3-1), ${misc:Depends}
Suggests: doc-base
Expand All @@ -32,7 +32,7 @@ Description: documentation for the GNU compilers (gcc, gobjc, g++)
Documentation License, and contains invariant sections, so it can't be
part of Debian main.

Package: cpp-4.4-doc
Package: cpp-4.5-doc
Architecture: all
Depends: gcc-doc-base (>= 4.1.1.nf3-1), ${misc:Depends}
Suggests: doc-base
Expand All @@ -44,7 +44,7 @@ Description: documentation for the GNU C preprocessor (cpp)
Documentation License, and contains invariant sections, so it can't be
part of Debian main.

Package: gfortran-4.4-doc
Package: gfortran-4.5-doc
Architecture: all
Depends: gcc-doc-base (>= 4.1.1.nf3-1), ${misc:Depends}
Suggests: doc-base
Expand All @@ -56,7 +56,7 @@ Description: documentation for the GNU Fortran Compiler (gfortran)
Documentation License, and contains invariant sections, so it can't be
part of Debian main.

Package: gnat-4.4-doc
Package: gnat-4.5-doc
Architecture: all
Depends: gcc-doc-base (>= 4.1.1.nf3-1), ${misc:Depends}
Suggests: doc-base
Expand All @@ -68,11 +68,11 @@ Description: documentation for the GNU Ada 95 Compiler (gnat)
Documentation License, and contains invariant sections, so it can't be
part of Debian main.

Package: gcj-4.4-doc
Package: gcj-4.5-doc
Architecture: all
Depends: gcc-doc-base (>= 4.1.1.nf3-1), ${misc:Depends}
Suggests: doc-base
Provides: gij-4.4-doc
Provides: gij-4.5-doc
Description: documentation for the GNU Java tools (gcj, gij)
This package contains manual pages and documentation in info and
html format, for the GNU Java Compiler, the GNU interpreter for Java
Expand Down
1 change: 0 additions & 1 deletion debian/convert-debian-gcc-diff_cmdline-4.4.4.nf1-1

This file was deleted.

1 change: 1 addition & 0 deletions debian/convert-debian-gcc-diff_cmdline-4.5.3
@@ -0,0 +1 @@
perl debian/convert-debian-gcc-diff ~/hacking/debian/gcc-4.5-4.5.3/debian/patches rename-info-files.diff gcc-plugindir-doc.diff pr40521-sequel-doc.diff alpha-ieee-doc.diff
3 changes: 2 additions & 1 deletion debian/copyright
@@ -1,4 +1,5 @@
This package was put together by Nikita V. Youshchenko <yoush@debian.org>.
This package was thrown together by Samuel J. J. Bronson <naesten@gmail.com>,
based on gcc-4.4-doc-non-dfsg by Nikita V. Youshchenko <yoush@debian.org>.

Package contains documentation files from gcc upstream distribution,
that was downloaded from ftp://ftp.gnu.org/gnu/gcc/.
Expand Down
2 changes: 0 additions & 2 deletions debian/cpp-4.4-doc.info

This file was deleted.

1 change: 0 additions & 1 deletion debian/cpp-4.4-doc.manpages

This file was deleted.

@@ -1,5 +1,5 @@
Document: cpp-4.4
Title: The GNU C preprocessor, version 4.4
Document: cpp-4.5
Title: The GNU C preprocessor, version 4.5
Author: Various
Abstract: The C preprocessor is a "macro processor" that is used automatically
by the C compiler to transform your program before actual compilation.
Expand All @@ -8,9 +8,9 @@ Abstract: The C preprocessor is a "macro processor" that is used automatically
Section: Programming

Format: html
Index: /usr/share/doc/cpp-4.4-doc/cpp.html
Files: /usr/share/doc/cpp-4.4-doc/cpp.html
Index: /usr/share/doc/cpp-4.5-doc/cpp.html
Files: /usr/share/doc/cpp-4.5-doc/cpp.html

Format: info
Index: /usr/share/info/cpp-4.4.info.gz
Files: /usr/share/info/cpp-4.4*
Index: /usr/share/info/cpp-4.5.info.gz
Files: /usr/share/info/cpp-4.5*
@@ -1,5 +1,5 @@
Document: cppinternals-4.4
Title: Internals of the GNU C preprocessor, version 4.4
Document: cppinternals-4.5
Title: Internals of the GNU C preprocessor, version 4.5
Author: Various
Abstract: This brief manual documents the internals of cpplib, and
explains some of the tricky issues. It is intended that, along with
Expand All @@ -9,9 +9,9 @@ Abstract: This brief manual documents the internals of cpplib, and
Section: Programming

Format: html
Index: /usr/share/doc/cpp-4.4-doc/cppinternals.html
Files: /usr/share/doc/cpp-4.4-doc/cppinternals.html
Index: /usr/share/doc/cpp-4.5-doc/cppinternals.html
Files: /usr/share/doc/cpp-4.5-doc/cppinternals.html

Format: info
Index: /usr/share/info/cppinternals-4.4.info.gz
Files: /usr/share/info/cppinternals-4.4*
Index: /usr/share/info/cppinternals-4.5.info.gz
Files: /usr/share/info/cppinternals-4.5*
File renamed without changes.
2 changes: 2 additions & 0 deletions debian/cpp-4.5-doc.info
@@ -0,0 +1,2 @@
cpp-4.5.info
cppinternals-4.5.info
1 change: 1 addition & 0 deletions debian/cpp-4.5-doc.manpages
@@ -0,0 +1 @@
cpp-4.5.1
61 changes: 61 additions & 0 deletions debian/extract-doc-tarball-from-upstream
@@ -0,0 +1,61 @@
#!/usr/bin/env python

# Copyright (c) 2012 Samuel Bronson
#
# Made available under the "expat" license, which follows:
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import sys, tarfile, re, posixpath
from pprint import pprint

try:
infn, pkg, ver = sys.argv[1:]
except ValueError:
print "usage: %s gcc-X.Y.Z.tar.(gz|bz2) gcc-X.Y-doc-non-dfsg X.Y.Z[.mumble]" % sys.argv[0]
exit(1)

outfn = '%s_%s.orig.tar.gz' % (pkg, ver)

# directory that output tarball would extract to
outdir = '%s-%s' % (pkg, ver)

intar = tarfile.open(infn, 'r|*', format=tarfile.PAX_FORMAT)
outtar = tarfile.open(outfn, 'w:gz')

pat = re.compile(r"^gcc/.*\.(7|texi)$ | ^libiberty/at-file.texi$ | ^contrib/texi2pod\.pl$",
re.VERBOSE)

for member in intar:
if not member.isreg():
continue

_, path = member.name.split('/', 1)

mo = pat.search(path)
if not mo:
continue

outpath = posixpath.join(outdir, path)
print outpath

mf = intar.extractfile(member)
member.name = outpath
outtar.addfile(member, mf)
14 changes: 0 additions & 14 deletions debian/gcc-4.4-doc.doc-base.gcc

This file was deleted.

17 changes: 0 additions & 17 deletions debian/gcc-4.4-doc.doc-base.gccint

This file was deleted.

3 changes: 0 additions & 3 deletions debian/gcc-4.4-doc.info

This file was deleted.

1 change: 0 additions & 1 deletion debian/gcc-4.4-doc.links

This file was deleted.

2 changes: 0 additions & 2 deletions debian/gcc-4.4-doc.manpages

This file was deleted.

14 changes: 14 additions & 0 deletions debian/gcc-4.5-doc.doc-base.gcc
@@ -0,0 +1,14 @@
Document: gcc-4.5
Title: The GNU C and C++ compiler, version 4.5
Author: Various
Abstract: This manual documents how to run, install and port the GNU compiler,
as well as its new features and incompatibilities, and how to report bugs.
Section: Programming

Format: html
Index: /usr/share/doc/gcc-4.5-doc/gcc.html
Files: /usr/share/doc/gcc-4.5-doc/gcc.html

Format: info
Index: /usr/share/info/gcc-4.5.info.gz
Files: /usr/share/info/gcc-4.5*

0 comments on commit efae923

Please sign in to comment.