Bug#887299: tldr should depend on e2fsprogs explicitly

2018-01-14 Thread Helmut Grohne
Package: tldr
Version: 0.2.3-2
User: helm...@debian.org
Usertags: nonessentiale2fsprogs

Dear maintainer,

We want to make removing e2fsprogs from installations possible. For standard
installations this is not useful, but embedded applications and chroots benefit
from such an option.  For getting there all packages that use e2fsprogs must be
identified and gain a dependency on it as e2fsprogs currently is essential.

tldr was identified as potentially needing such a dependency,
because it mentions tool names from e2fsprogs in the following files:

/usr/bin/tldr-hs contains badblocks, chattr, debugfs, dumpe2fs, e2freefrag, 
e2fsck, e2image, e2label, e2undo, e4crypt, e4defrag, filefrag, fsck.ext2, 
fsck.ext3, fsck.ext4, logsave, lsattr, mke2fs, mkfs.ext2, mkfs.ext3, mkfs.ext4, 
mklost+found, resize2fs and tune2fs. According to file it is a ELF 64-bit LSB 
executable, x86-64, version 1 (SYSV)

Please investigate whether these cases are actually uses of a tool from
e2fsprogs. Care has been taken to shrink the number of candidates as much as
possible, but a few false positives will remain. After doing so, do one of the
following:

 * Add e2fsprogs to Depends.
 * Add e2fsprogs to Recommends.
 * Close this bug explaining why e2fsprogs is not used by this package.

Once e2fsprogs drops the "Essential: yes" flag, this bug will be upgraded to RC
severity. Please note that lintian will warn about such a dependency before
lintian 2.5.56.

Thanks for your help

Helmut

___
Pkg-haskell-maintainers mailing list
Pkg-haskell-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers


Re: Bug#853285: closed by Clint Adams <cl...@debian.org> (Bug#853285: fixed in ghc 8.0.2-3)

2017-08-29 Thread Helmut Grohne
On Tue, Aug 29, 2017 at 10:44:51PM +0100, James Clarke wrote:
> I believe is this because haskell-devscripts-minimal is arch:all, so any
> architecture information does not propagate through. If my understanding is
> correct, making haskell-devscripts-minimal an arch:any package and using a
> :native Build-Depends on haskell-devscripts-minimal would fix this, but I'm
> sure Helmut can clarify?

All of that is correct. Still I don't see that as a good solution for
several reasons:

 * After doing so, every package that uses haskell-devscripts-minimal
   (or haskell-devscripts) will have to annotate its build dependency
   with :native. There are lots of reverse dependencies. I am still
   hoping for a way that causes less churn in the archive.

 * The obvious alternative is to just mark it Multi-Arch: foreign. This
   is not a new idea indeed #769377. Unfortunately it is wrong, because
   the tools in there are architecture-dependent (via exposing ghc
   stuff). From what I learned with pkg-config, cmake and others, I
   guess we'll mark it M-A:foreign anyway and document how to avoid
   issues with architecture-awareness, but this certainly needs more
   work.

 * We'll likely need ghc-for-build and ghc-for-host for a proper
   solution. Since ghc depends on gcc, we also need gcc-for-build and
   gcc-for-host. The latter was blocked by waiting for
   binutils-for-build and binutils-for-host until very recently. Making
   that work for gcc will be a little more work. Any volunteers? ;)

Helmut

___
Pkg-haskell-maintainers mailing list
Pkg-haskell-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers


Bug#853285: ghc: Patch to add support for cross-compilation of GHC

2017-01-31 Thread Helmut Grohne
Control: clone -1 -2
Control: retitle -2 support building ghc without building haddock
Control: block -1 by -2

On Tue, Jan 31, 2017 at 09:20:46AM +0100, John Paul Adrian Glaubitz wrote:
>   Setting "--target" allows enabling cross-compiling, adding
>   --enable-unregisterised is important for architectures not
>   having native code generation support. Disabling the documentation
>   is required by GHC itself. Trying to build the documentation
>   when cross-compiling causes an error message.

I'm not entirely sold on the idea that we cannot cross build haddock.
What about using the haddock from the ghc:native package to build the
documentation? But then maybe I understand too little of the
requirements here.

In any case, disabling haddock should not be a thing that just happens
for cross compilation. We want cross builds to be reproducible (when
compared against native builds). So disabling haddock should be a
concious choice (even if cross building without disabling haddock
doesn't work). Also building ghc without haddock should produce a
package that doesn't list haddock under Provides. This calls for a build
profile. So I went ahead and split out this part of your patch into a
patch that adds a pkg.ghc.nohaddock build profile.

It's not clear to me whether some Build-Depends should become droppable
under the profile.

I hope that this makes sense and that the resulting profile is useful
for cross compiling ghc. Do you agree?

Helmut
diff --minimal -Nru ghc-8.0.1/debian/changelog ghc-8.0.1/debian/changelog
--- ghc-8.0.1/debian/changelog  2016-12-17 03:44:45.0 +0100
+++ ghc-8.0.1/debian/changelog  2017-01-31 15:39:43.0 +0100
@@ -1,3 +1,10 @@
+ghc (8.0.1-17.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add pkg.ghc.nohaddock build profile for disabling haddock (Closes: #-1).
+
+ -- Helmut Grohne <hel...@subdivi.de>  Tue, 31 Jan 2017 15:39:43 +0100
+
 ghc (8.0.1-17) unstable; urgency=medium
 
   * Add upstream patch "Add relocation type R_X86_64_REX_GOTPCRELX".
diff --minimal -Nru ghc-8.0.1/debian/control ghc-8.0.1/debian/control
--- ghc-8.0.1/debian/control2016-10-28 07:42:05.0 +0200
+++ ghc-8.0.1/debian/control2017-01-31 15:39:43.0 +0100
@@ -49,8 +49,8 @@
   ${ghci},
   ${provided-devs},
   ${haskell:Provides},
-  haddock,
-  ghc-haddock,
+  haddock ,
+  ghc-haddock ,
   ${haddock:Provides}
 Replaces: ghc6 (<< 7), ghc-dynamic (<< 7.8), ghc-haddock (<< 7.10)
 Conflicts: ghc6 (<< 7), ghc-dynamic (<< 7.8), ${conflicting-devs}
@@ -94,6 +94,7 @@
 Breaks: libghc-terminfo-doc (<< 0.3.2.5-4), libghc-transformers-doc (<< 
0.3.0.0-6), libghc-xhtml-doc (<< 3000.2.1-5)
 Depends: ${haddock:Depends}, ${misc:Depends}, perl, libjs-mathjax
 Pre-Depends: dpkg (>= 1.16.1)
+Build-Profiles: 
 Description: Documentation for the Glasgow Haskell Compilation system
  The Glorious Glasgow Haskell Compilation system (GHC) is a compiler for
  Haskell.
diff --minimal -Nru ghc-8.0.1/debian/rules ghc-8.0.1/debian/rules
--- ghc-8.0.1/debian/rules  2016-11-14 17:07:27.0 +0100
+++ ghc-8.0.1/debian/rules  2017-01-31 15:39:43.0 +0100
@@ -35,7 +35,6 @@
 GHC=$(firstword $(shell bash -c "type -p ghc"))
 EXTRA_CONFIGURE_FLAGS=--with-ghc="$(GHC)"
 
-BUILD_HADDOCK_DOCS=YES
 DEB_HOOGLE_TXT_DIR = /usr/lib/ghc-doc/hoogle/
 
 ifeq (x32,$(DEB_HOST_ARCH))
@@ -48,9 +47,13 @@
 override_dh_auto_configure:
dh_autoreconf perl -- boot
echo "SRC_HC_OPTS += -lffi -optl-pthread" >> mk/build.mk
+ifeq ($(filter pkg.ghc.nohaddock,$(DEB_BUILD_PROFILES)),)
echo "HADDOCK_DOCS := YES" >> mk/build.mk
echo "EXTRA_HADDOCK_OPTS += 
--mathjax=file:///usr/share/javascript/mathjax/MathJax.js" >> mk/build.mk
echo "XSLTPROC_OPTS += --nonet" >> mk/build.mk
+else
+   echo "HADDOCK_DOCS := NO" >> mk/build.mk
+endif
 ifneq (,$(findstring $(DEB_HOST_ARCH), arm64 armel armhf))
echo "SRC_HC_OPTS += -optl-B/usr/bin/ld.gold" >> mk/build.mk
 endif
@@ -161,11 +164,11 @@
if test -e debian/tmp/usr/bin/ghci-$(ProjectVersion); then \
echo 'ghci=ghc-ghci' >> debian/ghc.substvars ; fi
 
+ifeq ($(filter pkg.ghc.nohaddock,$(DEB_BUILD_PROFILES)),)
# Add haddock substvars
echo 
"haddock:Depends=haddock-interface-$$(debian/tmp/usr/lib/ghc/bin/haddock 
--interface-version)" >> debian/ghc-doc.substvars
echo 
"haddock:Provides=haddock-interface-$$(debian/tmp/usr/lib/ghc/bin/haddock 
--interface-version)" >> debian/ghc.substvars
 
-ifeq (YES,$(BUILD_HADDOCK_DOCS))
mkdir -p debian/tmp/usr/lib/ghc-doc
cp debian/gen_contents_index debian/tmp/usr/lib/ghc-doc/
chmod +x debian/tmp/usr/lib/ghc-doc/gen_contents_index
@@ -191,8 +194,10 @@
echo "

Bug#853285: ghc: Patch to add support for cross-compilation of GHC

2017-01-31 Thread Helmut Grohne
Control: clone -1 -2
Control: retitle -2 ghc: honour DEB_BUILD_OPTIONS=nocheck
Control: block -1 by -2

On Tue, Jan 31, 2017 at 09:20:46AM +0100, John Paul Adrian Glaubitz wrote:
> Since building GHC natively on slower machines like m68k or sh4 can be quite
> painful, I have started working on making the GHC package cross-buildable.

Thank you. I was always reluctant to try it due to the size of the task,
but having your proof of concept shows that it really is feasible.

I think splitting the discussion into a few smaller subtopics could make
the whole thing easier. Thus I'll reply to various aspects in multiple
replies. This one will only cover running tests.

>   Additionally, I'm also guarding out the section which tries
>   to run the compiler for cross-builds, e.g. ("# Do some very
>   simple tests that the compiler actually works"). But Helmut
>   Grohne already pointed out that the proper way would be to
>   guard this by checking for "nocheck" in DEB_BUILD_OPTIONS
>   as both sbuild and pbuilder set "nocheck" by default when
>   cross-compiling. However, in some cases, like cross-compiling
>   from amd64 to i386, running the tests is still desired.

I refactored this part of the patch into checking DEB_BUILD_OPTIONS for
the presence of nocheck. I think that this is a direct improvement to
the ghc package and tested it with two native amd64 builds (one with
tests and the other without, unfortunately ghc isn't reproducible). I
can commit it to the experimental branch of DHG_packages if some other
DHG member agrees.

Let me also observe two things I found weird:
 * ghc does have a test suite, but the Debian package doesn't run it.
 * debian/rules uses findstring a lot where it should be using filter.

Helmut
diff --minimal -Nru ghc-8.0.1/debian/changelog ghc-8.0.1/debian/changelog
--- ghc-8.0.1/debian/changelog  2016-12-17 03:44:45.0 +0100
+++ ghc-8.0.1/debian/changelog  2017-01-31 13:33:36.0 +0100
@@ -1,3 +1,10 @@
+ghc (8.0.1-17.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Do not run tests under DEB_BUILD_OPTIONS=nocheck (Closes: #-1).
+
+ -- Helmut Grohne <hel...@subdivi.de>  Tue, 31 Jan 2017 13:33:36 +0100
+
 ghc (8.0.1-17) unstable; urgency=medium
 
   * Add upstream patch "Add relocation type R_X86_64_REX_GOTPCRELX".
diff --minimal -Nru ghc-8.0.1/debian/rules ghc-8.0.1/debian/rules
--- ghc-8.0.1/debian/rules  2016-11-14 17:07:27.0 +0100
+++ ghc-8.0.1/debian/rules  2017-01-31 13:32:58.0 +0100
@@ -108,6 +108,9 @@
 
 override_dh_auto_build:
dh_auto_build
+
+override_dh_auto_test:
+ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
# Do some very simple tests that the compiler actually works
rm -rf debian/testghc
mkdir debian/testghc
@@ -122,6 +125,7 @@
@printf "BEGIN GHC INFO OUTPUT\n"
@inplace/bin/ghc-stage2 --info
@printf "END GHC INFO OUTPUT\n"
+endif
 
 FILES = \( -type f -o -type l \)
 PROF_FILE = \( -name "*.p_*" -o -name "lib*_p.a" \)
___
Pkg-haskell-maintainers mailing list
Pkg-haskell-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers