about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2018-06-13 18:09:33 +0200
committerJan Tojnar <jtojnar@gmail.com>2018-06-13 20:15:05 +0200
commiteb969e2f8917b52c207730c0f836258d73431f63 (patch)
treedc838ef6594647dd29dc5909666afaae2939cfcf
parent79b78085978db9a8c7057025320aa83082b10921 (diff)
downloadnixlib-eb969e2f8917b52c207730c0f836258d73431f63.tar
nixlib-eb969e2f8917b52c207730c0f836258d73431f63.tar.gz
nixlib-eb969e2f8917b52c207730c0f836258d73431f63.tar.bz2
nixlib-eb969e2f8917b52c207730c0f836258d73431f63.tar.lz
nixlib-eb969e2f8917b52c207730c0f836258d73431f63.tar.xz
nixlib-eb969e2f8917b52c207730c0f836258d73431f63.tar.zst
nixlib-eb969e2f8917b52c207730c0f836258d73431f63.zip
flatpak: 0.11.7 → 0.11.8.2
-rw-r--r--pkgs/development/libraries/flatpak/default.nix4
-rw-r--r--pkgs/development/libraries/flatpak/fix-test-paths.patch57
2 files changed, 43 insertions, 18 deletions
diff --git a/pkgs/development/libraries/flatpak/default.nix b/pkgs/development/libraries/flatpak/default.nix
index f26dad3ce15e..eeaa1e324961 100644
--- a/pkgs/development/libraries/flatpak/default.nix
+++ b/pkgs/development/libraries/flatpak/default.nix
@@ -4,7 +4,7 @@
 , libsoup, lzma, ostree, polkit, python3, systemd, xlibs, valgrind, glib_networking, makeWrapper, gnome3 }:
 
 let
-  version = "0.11.7";
+  version = "0.11.8.2";
   desktop_schemas = gnome3.gsettings_desktop_schemas;
 in stdenv.mkDerivation rec {
   name = "flatpak-${version}";
@@ -13,7 +13,7 @@ in stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "https://github.com/flatpak/flatpak/releases/download/${version}/${name}.tar.xz";
-    sha256 = "1vq4j7v68lp4fsvpas1bcsx1z4snpj0mkbq2mi00kx3jb48z768h";
+    sha256 = "03c2fx0y7irvws25858x217xmbacn2vfdypf8vc32hkrbh9i6df7";
   };
 
   patches = [
diff --git a/pkgs/development/libraries/flatpak/fix-test-paths.patch b/pkgs/development/libraries/flatpak/fix-test-paths.patch
index a548f3882864..0c2b7da79eb3 100644
--- a/pkgs/development/libraries/flatpak/fix-test-paths.patch
+++ b/pkgs/development/libraries/flatpak/fix-test-paths.patch
@@ -1,6 +1,6 @@
 --- a/tests/libtest.sh
 +++ b/tests/libtest.sh
-@@ -322,7 +322,7 @@
+@@ -324,7 +324,7 @@
          # running installed-tests: assume we know what we're doing
          :
      elif ! "$FLATPAK_BWRAP" --unshare-ipc --unshare-net --unshare-pid \
@@ -9,7 +9,7 @@
          sed -e 's/^/# /' < bwrap-result
          echo "1..0 # SKIP Cannot run bwrap"
          exit 0
-@@ -330,7 +330,7 @@
+@@ -332,7 +332,7 @@
  }
  
  skip_without_python2 () {
@@ -18,7 +18,7 @@
          echo "1..0 # SKIP this test requires /usr/bin/python2 (2.7) support"
          exit 0
      fi
-@@ -350,12 +350,12 @@
+@@ -352,12 +352,12 @@
  export DBUS_SESSION_BUS_ADDRESS="$(cat dbus-session-bus-address)"
  DBUS_SESSION_BUS_PID="$(cat dbus-session-bus-pid)"
  
@@ -28,30 +28,51 @@
  fi
  
  cleanup () {
--    /bin/kill $DBUS_SESSION_BUS_PID ${FLATPAK_HTTP_PID:-}
-+    @coreutils@/bin/kill $DBUS_SESSION_BUS_PID ${FLATPAK_HTTP_PID:-}
+-    /bin/kill -9 $DBUS_SESSION_BUS_PID ${FLATPAK_HTTP_PID:-}
++    @coreutils@/bin/kill -9 $DBUS_SESSION_BUS_PID ${FLATPAK_HTTP_PID:-}
      gpg-connect-agent --homedir "${FL_GPG_HOMEDIR}" killagent /bye || true
      fusermount -u $XDG_RUNTIME_DIR/doc || :
      if test -n "${TEST_SKIP_CLEANUP:-}"; then
 --- a/tests/make-test-runtime.sh
 +++ b/tests/make-test-runtime.sh
-@@ -21,6 +21,7 @@
- cat ${DIR}/metadata
+@@ -26,6 +26,7 @@
+ PATH="$PATH:/usr/sbin:/sbin"
  
  # Add bash and dependencies
 +mkdir -p ${DIR}/nix/store
  mkdir -p ${DIR}/usr/bin
  mkdir -p ${DIR}/usr/lib
  ln -s ../lib ${DIR}/usr/lib64
-@@ -30,47 +31,27 @@
+@@ -35,73 +36,27 @@
  else
      cp `which ldconfig` ${DIR}/usr/bin
  fi
--T=`mktemp`
--for i in $@; do
+-LIBS=`mktemp`
+-BINS=`mktemp`
+-
+-add_bin() {
+-    local f=$1
+-    shift
+-
+-    if grep -qFe "${f}" $BINS; then
+-        # Already handled
+-        return 0
+-    fi
+-
+-    echo $f >> $BINS
+-
+-    # Add library dependencies
+-    (ldd "${f}" | sed "s/.* => //"  | awk '{ print $1}' | grep ^/ | sort -u -o $LIBS $LIBS -)  || true
+-
+-    local shebang=$(sed -n '1s/^#!\([^ ]*\).*/\1/p' "${f}")
+-    if [ x$shebang != x ]; then
+-        add_bin "$shebang"
+-    fi
+-}
+-
+ for i in $@; do
 -    I=`which $i`
--    cp $I ${DIR}/usr/bin
--    ldd $I | sed "s/.* => //"  | awk '{ print $1}' | grep ^/ | grep ^/ >> $T
+-    add_bin $I
 -    if test $i == python2; then
 -        mkdir -p ${DIR}/usr/lib/python2.7/lib-dynload
 -        # This is a hardcoded minimal set of modules we need in the current tests.
@@ -78,10 +99,13 @@
 -        done
 -    fi
 -done
- ln -s bash ${DIR}/usr/bin/sh
--for i in `sort -u $T`; do
+-for i in `cat $BINS`; do
+-    echo Adding binary $i 1>&2
+-    cp "$i" ${DIR}/usr/bin/
+-done
+-for i in `cat $LIBS`; do
+-    echo Adding library $i 1>&2
 -    cp "$i" ${DIR}/usr/lib/
-+for i in $@; do
 +    I=$(readlink -f $(which $i))
 +    requisites=$(nix-store --query --requisites "$I")
 +    for r in $requisites; do
@@ -92,6 +116,7 @@
 +    done
 +    ln -s $I ${DIR}/usr/bin/$i
  done
+ ln -s bash ${DIR}/usr/bin/sh
  
 -# We copy the C.UTF8 locale and call it en_US. Its a bit of a lie, but
 -# the real en_US locale is often not available, because its in the
@@ -110,7 +135,7 @@
      collection_args=--collection-id=${COLLECTION_ID}
 --- a/tests/testlibrary.c
 +++ b/tests/testlibrary.c
-@@ -378,7 +378,7 @@
+@@ -610,7 +610,7 @@
      {
        gint exit_code = 0;
        char *argv[] = { (char *)bwrap, "--unshare-ipc", "--unshare-net",