uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,25 @@
From 0cb1321c4cbb2978318ddad73c9ee6f2a19c55c8 Mon Sep 17 00:00:00 2001
From: Florian Klink <flokli@flokli.de>
Date: Sat, 11 Jan 2020 21:06:33 +0100
Subject: [PATCH] umount_davfs: substitute ps command
---
src/umount_davfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/umount_davfs.c b/src/umount_davfs.c
index b7019c3..a278679 100644
--- a/src/umount_davfs.c
+++ b/src/umount_davfs.c
@@ -157,7 +157,7 @@ main(int argc, char *argv[])
}
fclose(file);
- char *ps_command = ne_concat("ps -p ", pid, NULL);
+ char *ps_command = ne_concat("@ps@ -p ", pid, NULL);
FILE *ps_in = popen(ps_command, "r");
if (!ps_in) {
error(0, 0,
--
2.24.1

View file

@ -0,0 +1,42 @@
From 56873cf29974ff0dfc1ba1afb7022ce49e300835 Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Wed, 11 Nov 2020 11:58:25 +0100
Subject: [PATCH 2/2] Make sure that the setuid-wrapped `umount` is invoked
---
src/dav_fuse.c | 2 +-
src/umount_davfs.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/dav_fuse.c b/src/dav_fuse.c
index 734bc1f..4501433 100644
--- a/src/dav_fuse.c
+++ b/src/dav_fuse.c
@@ -187,7 +187,7 @@ dav_fuse_loop(int device, char *mpoint, size_t bufsize, time_t idle_time,
unmounting = 1;
pid_t pid = fork();
if (pid == 0) {
- execl("/bin/umount", "umount", "-il", mountpoint, NULL);
+ execl("@wrapperDir@/umount", "umount", "-il", mountpoint, NULL);
_exit(EXIT_FAILURE);
}
}
diff --git a/src/umount_davfs.c b/src/umount_davfs.c
index b7019c3..75e3b4b 100644
--- a/src/umount_davfs.c
+++ b/src/umount_davfs.c
@@ -122,9 +122,9 @@ main(int argc, char *argv[])
char *umount_command = NULL;
if (mpoint) {
- umount_command = ne_concat("umount -i '", mpoint, "'", NULL);
+ umount_command = ne_concat("@wrapperDir@/umount -i '", mpoint, "'", NULL);
} else {
- umount_command = ne_concat("umount -i '", argv[optind], "'", NULL);
+ umount_command = ne_concat("@wrapperDir@/umount -i '", argv[optind], "'", NULL);
error(0, 0,
_("\n"
" can't evaluate PID file name;\n"
--
2.28.0

View file

@ -0,0 +1,56 @@
{ lib, stdenv
, fetchurl
, fetchpatch
, neon
, procps
, substituteAll
, zlib
, wrapperDir ? "/run/wrappers/bin"
}:
stdenv.mkDerivation rec {
pname = "davfs2";
version = "1.6.1";
src = fetchurl {
url = "mirror://savannah/davfs2/davfs2-${version}.tar.gz";
sha256 = "sha256-zj65SOzlgqUck0zLDMcOZZg5FycXyv8XP2ml4q+QxcA=";
};
buildInputs = [ neon zlib ];
patches = [
./fix-sysconfdir.patch
(substituteAll {
src = ./0001-umount_davfs-substitute-ps-command.patch;
ps = "${procps}/bin/ps";
})
(substituteAll {
src = ./0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch;
inherit wrapperDir;
})
];
configureFlags = [ "--sysconfdir=/etc" ];
makeFlags = [
"sbindir=$(out)/sbin"
"ssbindir=$(out)/sbin"
];
meta = {
homepage = "https://savannah.nongnu.org/projects/davfs2";
description = "Mount WebDAV shares like a typical filesystem";
license = lib.licenses.gpl3Plus;
longDescription = ''
Web Distributed Authoring and Versioning (WebDAV), an extension to
the HTTP-protocol, allows authoring of resources on a remote web
server. davfs2 provides the ability to access such resources like
a typical filesystem, allowing for use by standard applications
with no built-in support for WebDAV.
'';
platforms = lib.platforms.linux;
};
}

View file

@ -0,0 +1,60 @@
diff -ubr davfs2-1.4.7-orig/etc/Makefile.am davfs2-1.4.7/etc/Makefile.am
--- davfs2-1.4.7-orig/etc/Makefile.am 2013-02-21 11:45:00.185763558 +0100
+++ davfs2-1.4.7/etc/Makefile.am 2013-02-21 11:53:05.423197775 +0100
@@ -24,17 +24,17 @@
install-data-local: $(dist_pkgdata_DATA)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)
- $(INSTALL_DATA) -b davfs2.conf $(DESTDIR)$(pkgsysconfdir)/davfs2.conf
- $(INSTALL_DATA) -b -m 600 secrets $(DESTDIR)$(pkgsysconfdir)/secrets
- $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)/certs
- $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)/certs/private
- chmod 700 $(DESTDIR)$(pkgsysconfdir)/certs/private
+ $(mkinstalldirs) $(out)$(pkgsysconfdir)
+ $(INSTALL_DATA) -b davfs2.conf $(out)$(pkgsysconfdir)/davfs2.conf
+ $(INSTALL_DATA) -b -m 600 secrets $(out)$(pkgsysconfdir)/secrets
+ $(mkinstalldirs) $(out)$(pkgsysconfdir)/certs
+ $(mkinstalldirs) $(out)$(pkgsysconfdir)/certs/private
+ chmod 700 $(out)$(pkgsysconfdir)/certs/private
uninstall-local:
@$(NORMAL_UNINSTALL)
@list='$(dist_pkgdata_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " rm -f $(DESTDIR)$(pkgsysconfdir)/$$f"; \
- rm -f $(DESTDIR)$(pkgsysconfdir)/$$f; \
+ echo " rm -f $(out)$(pkgsysconfdir)/$$f"; \
+ rm -f $(out)$(pkgsysconfdir)/$$f; \
done
diff -ubr davfs2-1.4.7-orig/etc/Makefile.in davfs2-1.4.7/etc/Makefile.in
--- davfs2-1.4.7-orig/etc/Makefile.in 2013-02-21 11:45:00.185763558 +0100
+++ davfs2-1.4.7/etc/Makefile.in 2013-02-21 11:53:27.241207128 +0100
@@ -408,19 +408,19 @@
install-data-local: $(dist_pkgdata_DATA)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)
- $(INSTALL_DATA) -b davfs2.conf $(DESTDIR)$(pkgsysconfdir)/davfs2.conf
- $(INSTALL_DATA) -b -m 600 secrets $(DESTDIR)$(pkgsysconfdir)/secrets
- $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)/certs
- $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)/certs/private
- chmod 700 $(DESTDIR)$(pkgsysconfdir)/certs/private
+ $(mkinstalldirs) $(out)$(pkgsysconfdir)
+ $(INSTALL_DATA) -b davfs2.conf $(out)$(pkgsysconfdir)/davfs2.conf
+ $(INSTALL_DATA) -b -m 600 secrets $(out)$(pkgsysconfdir)/secrets
+ $(mkinstalldirs) $(out)$(pkgsysconfdir)/certs
+ $(mkinstalldirs) $(out)$(pkgsysconfdir)/certs/private
+ chmod 700 $(out)$(pkgsysconfdir)/certs/private
uninstall-local:
@$(NORMAL_UNINSTALL)
@list='$(dist_pkgdata_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " rm -f $(DESTDIR)$(pkgsysconfdir)/$$f"; \
- rm -f $(DESTDIR)$(pkgsysconfdir)/$$f; \
+ echo " rm -f $(out)$(pkgsysconfdir)/$$f"; \
+ rm -f $(out)$(pkgsysconfdir)/$$f; \
done
# Tell versions [3.59,3.63) of GNU make to not export all variables.

View file

@ -0,0 +1,30 @@
diff -ur davfs2-1.4.5-old/src/dav_coda.c davfs2-1.4.5-new/src/dav_coda.c
--- davfs2-1.4.5-old/src/dav_coda.c 2009-06-04 20:30:32.000000000 +0200
+++ davfs2-1.4.5-new/src/dav_coda.c 2011-02-09 19:51:22.260530572 +0100
@@ -52,6 +52,10 @@
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
#include "defaults.h"
#include "mount_davfs.h"
diff -ur davfs2-1.4.5-old/src/dav_fuse.c davfs2-1.4.5-new/src/dav_fuse.c
--- davfs2-1.4.5-old/src/dav_fuse.c 2009-06-30 20:06:44.000000000 +0200
+++ davfs2-1.4.5-new/src/dav_fuse.c 2011-02-09 19:52:23.938220524 +0100
@@ -41,6 +41,12 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
#include "defaults.h"
#include "mount_davfs.h"