Skip to content

Commit

Permalink
unix: update Linux to v4.13 kernel and v2.26 glibc
Browse files Browse the repository at this point in the history
This change updates the Linux symbols to correspond to v4.13 of the
kernel and v2.26 of glibc. To get everything building correctly, newer
versions of the build tools are required. Instead of trying to get an
Ubuntu 17.10 docker image working, we just add Artful sources to
/etc/apt/sources.list to get a similar effect.

Now that the kernel UAPI is updated, FS_MAX_KEY_SIZE and fscrypt_key no
longer need to be manually declared, as they are now in the proper
kernel headers.

Change-Id: I5f14c99fd70b43dbb8b44e05f53e4e9f09c9a345
Reviewed-on: https://go-review.googlesource.com/61771
Reviewed-by: Ian Lance Taylor <iant@golang.org>
  • Loading branch information
josephlr authored and ianlancetaylor committed Sep 7, 2017
1 parent 9aade4d commit 31e1faf
Show file tree
Hide file tree
Showing 35 changed files with 439 additions and 85 deletions.
11 changes: 7 additions & 4 deletions unix/linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM ubuntu:16.04

# Use the most recent ubuntu sources
RUN echo 'deb http://en.archive.ubuntu.com/ubuntu/ artful main universe' >> /etc/apt/sources.list

# Dependencies to get the git sources and go binaries
RUN apt-get update && apt-get install -y \
curl \
Expand All @@ -9,10 +12,10 @@ RUN apt-get update && apt-get install -y \
# Get the git sources. If not cached, this takes O(5 minutes).
WORKDIR /git
RUN git config --global advice.detachedHead false
# Linux Kernel: Released 19 Feb 2017
RUN git clone --branch v4.10 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
# GNU C library: Released 05 Feb 2017 (we should try to get a secure way to clone this)
RUN git clone --branch glibc-2.25 --depth 1 git://sourceware.org/git/glibc.git
# Linux Kernel: Released 03 Sep 2017
RUN git clone --branch v4.13 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
# GNU C library: Released 02 Aug 2017 (we should try to get a secure way to clone this)
RUN git clone --branch glibc-2.26 --depth 1 git://sourceware.org/git/glibc.git

# Get Go 1.8 (https://github.com/docker-library/golang/blob/master/1.8/Dockerfile)
ENV GOLANG_VERSION 1.8
Expand Down
8 changes: 0 additions & 8 deletions unix/linux/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,6 @@ struct stat {
#endif
// Certain constants and structs are missing from the fs/crypto UAPI
#define FS_MAX_KEY_SIZE 64
struct fscrypt_key {
__u32 mode;
__u8 raw[FS_MAX_KEY_SIZE];
__u32 size;
};
#ifdef TCSETS2
// On systems that have "struct termios2" use this as type Termios.
typedef struct termios2 termios_t;
Expand Down
43 changes: 37 additions & 6 deletions unix/zerrors_linux_386.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 31e1faf

Please sign in to comment.