Mail archive

Re: [alpine-devel] Porting Alpine scripts

From: Timo Teras <>
Date: Mon, 21 Nov 2016 10:59:25 +0200

On Mon, 21 Nov 2016 07:39:27 +0700
"Tuan M. Hoang" <> wrote:

> I see that you didn't provide linux-grsec/config-grsec.aarch64. grsec
> does not support aarch64 neither? I have read some grsec patch and it
> looks like they do provide some s390/s390x patch like this one :
> I am not sure is this called "supported".

Yes, aarch64 is not supported to my knowledge.

But indeed there seems to be s390 support in grsec. Feel free to look
at it, and enable a grsec config for it.

> Actually according to the log above, $ paxctl are those failed
> (ret=1). I will try to strace them this week.


> > I would be happy to pick up some of these patches already now. Would
> > you be able to give them exported with "git format-patch" so you get
> > annotated as author and the commit log is preserved.
> >
> > I could try bootstrap s390 too then and see if the same problem
> > happens and analyze it a bit more.
> >
> > In any case I recently fixed the bootstrap script and few aports. I
> > was able to bootstrap again git master for armv7.
> >
> Please find my patches in the attachments. There were some small
> changes that I did not include in those patches because I think it
> only (temporarily) affects my build. So I list here fyi:
> - scripts/ : linux-headers & zlib-dev need to be
> explicitly installed (besides fortify-headers, libc-dev, build-base)
> even though linux-headers is zlib's makedends, zlib-dev is binutils's
> makedepends.
> If there was any problem, please kindly let me know.

I applied apk-tools patch to both aports, and apk-tools git. I also
took parts of aports/gcc patch (the s390 specific config).
linux-headers patch was applied as is.

I'm still looking at the rest of the patches. Here's my review thoughts
of them:

- aports/gcc, moving the symlink is probably not the right
  solution. We prefer to keep that in the main 'gcc' package. During
  cross-build it should work so that the 'gcc-s390x' cross-build
  package has this in usr/s390x-alpine-linux-musl/lib/ Now
  it breaks because on other arch's this is in reality a linker script
  and not a symlink. The linker script enables gcc to search for the
  right file from all of the libpath again. But s390 is having it as
  symlink, and breaks because the actual file is relocated to the
  sysroot. I am not fully sure what to do here. I might lean on just
  overwriting the cross compiler's to be a while with
  GROUP ( -lgcc )

  I'll think about it a bit more, and can push a fix later today for it.

- aports/linux-vanilla looks good. Though you probably just got the
  kernel config from some other linux distro? It would probably be good
  to cross-check that with other Alpine's linux-vanilla configs to see
  that it is more or less in harmony.

- aports/musl looks mostly ok. We hope musl would soon make release,
  and much of the patch is not needed then as it's mostly upstreamed
  now. There's one issue that's causing some of your trouble. The
  following hunk is wrong:

_at_@ -142,6 +146,7 @@ compat() {
         mips*) _ld="" ;;
+ s390*) _ld="" ;;

  The compat package is supposed to create symlinks that mimic glibc
  provided ld and libraries. The _ld var needs to be setup to be the
  glibc ld name, not the musl one. Looking at gcc, the proper thing
  here to do is:
- mips*) _ld="" ;;
+ mips* | s390*) _ld="" ;;

- In main/libressl you add --disable-asm? Why is this needed?
  It seemed to compile just fine without this flag. If really needed,
  this should be made conditional so that it's only applied for s390.

- The bootstrap script changes should not be needed after the above

Thanks for working on this! It's starting to look pretty good, and with
the few tweaks above and after musl release, I think we are good to
commit all of the required changes.


Received on Mon Nov 21 2016 - 10:59:25 UTC