Bug#900885: dump FTBFS on Alpha; no getpid syscall

2018-06-06 Thread Alexander Zangerl
On Thu, 07 Jun 2018 08:51:35 +1200, Michael Cree writes:
>I doubt that this has anything to do with posix.

yes, you're right, i had forgotten about that patch actually
having to work around the clone syscall by using not just getpid()
(which is in posix) but the lower level syscall stuff.

>Was that for 32-bit sparc (which Debian no longer
>supports) or 64-bit sparc (which is a ports architecture)?

64 bit if i remember correctly.

>I'll ask on #debian-ports as to
>whether anyone knows why the sparc patch was introduced.

don't bother: i wrote that patch about 8-10 years ago when i needed
this to work on sparc boxes.

anyway, i'll sort this out for alpha without breaking sparc if possible.

regards
az


-- 
Alexander Zangerl + GPG Key 2FCCF66BB963BD5F + http://snafu.priv.at/
To clean and uninfected by the Empire remain, Emacs you use must. 
 -- Tollef Fog Heen


signature.asc
Description: Digital Signature


Bug#900885: dump FTBFS on Alpha; no getpid syscall

2018-06-06 Thread Michael Cree
On Wed, Jun 06, 2018 at 09:43:20PM +1000, Alexander Zangerl wrote:
> On Wed, 06 Jun 2018 22:51:08 +1200, Michael Cree writes:
> >dump FTBFS on alpha with [1]:
> ...
> >Alpha Linux does not have the getpid syscall; it follows OSF1.0
> 
> oh the joy of non-posix environments :-(

I doubt that this has anything to do with posix. Posix specifies
the API and by calling kernel syscalls dump is sidestepping the
standard API.  Syscalls are part of the kernel ABI and is
notably architecture dependent.

The patch that introduced these syscalls was to support a Sparc
idiosyncracy.  Was that for 32-bit sparc (which Debian no longer
supports) or 64-bit sparc (which is a ports architecture)? If the
former the best solution may be to drop the sparc-clone-lockup
patch, which is what introduced dependencies on the syscall ABI
and broke the build on Alpha.  I'll ask on #debian-ports as to
whether anyone knows why the sparc patch was introduced.

Cheers
Michael.



Bug#900885: dump FTBFS on Alpha; no getpid syscall

2018-06-06 Thread Alexander Zangerl
On Wed, 06 Jun 2018 22:51:08 +1200, Michael Cree writes:
>dump FTBFS on alpha with [1]:
...
>Alpha Linux does not have the getpid syscall; it follows OSF1.0

oh the joy of non-posix environments :-(

but thanks for the info and the patch; i'll get that sorted out
sometime in the next few days.

regards
az


-- 
Alexander Zangerl + GPG Key 2FCCF66BB963BD5F + http://snafu.priv.at/
Hit any user to continue.


signature.asc
Description: Digital Signature


Bug#900885: dump FTBFS on Alpha; no getpid syscall

2018-06-06 Thread Michael Cree
Source: dump
Version: 0.4b46-4
Severity: important
Justification: Fails to build from source but built in past
User: debian-al...@lists.debian.org
Usertags: ftbfs
Tags: patch

dump FTBFS on alpha with [1]:

gcc -DHAVE_CONFIG_H -I. -I..  -I../dump -I../compat/include -I../common
-Wdate-time -D_FORTIFY_SOURCE=2 -D_USE_BSD_SIGNAL
-D_PATH_DUMPDATES=\"/var/lib/dumpdates\" -D_DUMP_VERSION=\"0.4b46\"
-D_PATH_RMT=\"/etc/rmt\"  -g -O2 -fdebug-prefix-map=/<>=.
-Wformat -Werror=format-security -fPIE -c -o tape.o tape.c
tape.c: In function 'fork_clone_io':
tape.c:748:12: error: 'SYS_getpid' undeclared (first use in this
function); did you mean 'SYS_getxpid'?
syscall(SYS_getpid);
^~

Alpha Linux does not have the getpid syscall; it follows OSF1.0
conventions which has the getxpid syscall returning the PID (and
other info inaccessible via the C ABI).

This problem was introduced in the patch sparc-clone-lockup.  I
attach a fix and that is to be applied on top of
debian/patches/sparc-clone-lockup.

Cheers,
Michael.

[1]
https://buildd.debian.org/status/fetch.php?pkg=dump=alpha=0.4b46-4=1528213679=0
--- a/dump/tape.c
+++ b/dump/tape.c
@@ -745,7 +745,11 @@
getppid();
/* as per clone call manpage: caching! */
getpid();
+#ifdef __alpha__
+   syscall(SYS_getxpid);
+#else
syscall(SYS_getpid);
+#endif
 
/* az: clone manpage doesn't say jack about what the
   child receives, but it's NOT ZERO on sparc. however, it seems the