xref: /OK3568_Linux_fs/buildroot/package/screen/0003-install-always-chmod.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From: Maarten ter Huurne <maarten@treewalker.org>
2Date: Mon, 15 Sep 2014 00:03:05 +0200
3Subject: Change binary permission flags even if chown fails
4
5Typically when creating a package, the build is not run as root, so
6the chown will fail. But the chmod can still be done.
7
8Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
9---
10 Makefile.in | 3 ++-
11 1 file changed, 2 insertions(+), 1 deletion(-)
12
13diff --git a/Makefile.in b/Makefile.in
14index 65549e9..3c12fdb 100644
15--- a/Makefile.in
16+++ b/Makefile.in
17@@ -84,7 +84,8 @@ screen: $(OFILES)
18
19 install_bin: .version screen
20 	$(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN)
21-	-chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN)
22+	-chown root $(DESTDIR)$(bindir)/$(SCREEN)
23+	-chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN)
24 # This doesn't work if $(bindir)/screen is a symlink
25 	rm -f $(DESTDIR)$(bindir)/screen
26 	(cd $(DESTDIR)$(bindir) && ln -f -s $(SCREEN) screen)
27--
281.8.4.5
29
30