Преглед на файлове

sudo: imported from oldpackages repo, updated to version 1.8.11p2

Signed-off-by: Gergely Kiss <mail.gery@gmail.com>
Tested-by: Gergely Kiss <mail.gery@gmail.com>
Gergely Kiss преди 10 години
родител
ревизия
983d20ee86
променени са 4 файла, в които са добавени 143 реда и са изтрити 0 реда
  1. 95
    0
      admin/sudo/Makefile
  2. 11
    0
      admin/sudo/files/sudo.init
  3. 25
    0
      admin/sudo/patches/010-cross-compile-fixes.patch
  4. 12
    0
      admin/sudo/patches/020-no-owner-change.patch

+ 95
- 0
admin/sudo/Makefile Целия файл

@@ -0,0 +1,95 @@
1
+#
2
+# Copyright (C) 2006-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=sudo
11
+PKG_VERSION:=1.8.11p2
12
+PKG_RELEASE:=1
13
+PKG_LICENSE:=ISC
14
+PKG_LICENSE_FILES:=doc/LICENSE
15
+
16
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17
+PKG_SOURCE_URL:=http://www.sudo.ws/sudo/dist
18
+PKG_MD5SUM:=84012b4871b6c775c957cd310d5bad87
19
+
20
+PKG_INSTALL:=1
21
+
22
+PKG_BUILD_DEPENDS:=sudo/host
23
+
24
+include $(INCLUDE_DIR)/package.mk
25
+
26
+define Package/sudo
27
+  SECTION:=admin
28
+  CATEGORY:=Administration
29
+  TITLE:=Delegate authority to run commands
30
+  URL:=http://www.sudo.ws/
31
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
32
+endef
33
+
34
+define Package/sudo/description
35
+ Sudo (su "do") allows a system administrator to delegate authority to
36
+ give certain users (or groups of users) the ability to run some (or
37
+ all) commands as root or another user while providing an audit trail of
38
+ the commands and their arguments.
39
+endef
40
+
41
+define Package/sudo/conffiles
42
+/etc/sudoers
43
+endef
44
+
45
+CONFIGURE_ARGS+= \
46
+	--without-pam \
47
+	--disable-pam-session \
48
+	--with-editor=/bin/vi \
49
+	--without-lecture \
50
+	--disable-zlib
51
+
52
+CONFIGURE_VARS+= \
53
+	sudo_cv_uid_t_len=10 \
54
+	sudo_cv_func_unsetenv_void=no
55
+
56
+include $(INCLUDE_DIR)/host-build.mk
57
+
58
+define Host/Compile
59
+	cd $(HOST_BUILD_DIR)/lib/util; \
60
+	    $(MAKE) mksiglist; $(MAKE) mksigname
61
+endef
62
+
63
+define Host/Install
64
+	$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
65
+	$(CP) $(HOST_BUILD_DIR)/lib/util/mksig{list,name} $(STAGING_DIR_HOST)/bin/
66
+endef
67
+
68
+$(eval $(call HostBuild))
69
+
70
+define Package/sudo/install
71
+	$(INSTALL_DIR) $(1)/usr/bin
72
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/sudo $(1)/usr/bin/
73
+	chmod 4755 $(1)/usr/bin/sudo
74
+	$(INSTALL_DIR) $(1)/usr/sbin
75
+	$(CP) $(PKG_INSTALL_DIR)/usr/sbin/visudo $(1)/usr/sbin/
76
+	$(INSTALL_DIR) $(1)/etc
77
+	$(CP) $(PKG_INSTALL_DIR)/etc/sudoers $(1)/etc/
78
+	chmod 0440 $(1)/etc/sudoers
79
+	$(INSTALL_DIR) $(1)/etc/sudoers.d
80
+	$(INSTALL_DIR) $(1)/usr/lib/sudo
81
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/sudo/*.so* $(1)/usr/lib/sudo/
82
+	$(INSTALL_DIR) $(1)/etc/init.d
83
+	$(INSTALL_BIN) ./files/sudo.init $(1)/etc/init.d/sudo
84
+endef
85
+
86
+define Package/sudo/postinst
87
+#!/bin/sh
88
+
89
+[ -n "$$IPKG_INSTROOT" ] || {
90
+	/etc/init.d/sudo enable
91
+	/etc/init.d/sudo start
92
+}
93
+endef
94
+
95
+$(eval $(call BuildPackage,sudo))

+ 11
- 0
admin/sudo/files/sudo.init Целия файл

@@ -0,0 +1,11 @@
1
+#!/bin/sh /etc/rc.common
2
+# Copyright (C) 2014 OpenWrt.org
3
+
4
+START=99
5
+
6
+start() {
7
+	[ -d /var/lib/sudo ] || {
8
+		mkdir -m 0755 -p /var/lib/sudo
9
+		chmod 0700 /var/lib/sudo
10
+	}
11
+}

+ 25
- 0
admin/sudo/patches/010-cross-compile-fixes.patch Целия файл

@@ -0,0 +1,25 @@
1
+diff -rupN sudo-1.8.11p2.orig/lib/util/Makefile.in sudo-1.8.11p2/lib/util/Makefile.in
2
+--- sudo-1.8.11p2.orig/lib/util/Makefile.in	2014-10-07 22:26:20.000000000 +0200
3
++++ sudo-1.8.11p2/lib/util/Makefile.in	2014-12-09 21:44:35.610041162 +0100
4
+@@ -17,6 +17,8 @@
5
+ # @configure_input@
6
+ #
7
+ 
8
++include $(TOPDIR)/rules.mk
9
++
10
+ #### Start of system configuration section. ####
11
+ 
12
+ srcdir = @srcdir@
13
+@@ -142,10 +144,10 @@ libsudo_util.la: $(LTOBJS) @LT_LDDEP@
14
+ 	esac
15
+ 
16
+ siglist.c: mksiglist
17
+-	./mksiglist > $@
18
++	$(STAGING_DIR_HOST)/bin/mksiglist > $@
19
+ 
20
+ signame.c: mksigname
21
+-	./mksigname > $@
22
++	$(STAGING_DIR_HOST)/bin/mksigname > $@
23
+ 
24
+ mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/sudo_compat.h $(top_builddir)/config.h
25
+ 	$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@

+ 12
- 0
admin/sudo/patches/020-no-owner-change.patch Целия файл

@@ -0,0 +1,12 @@
1
+diff -rupN sudo-1.8.11p2.orig/Makefile.in sudo-1.8.11p2/Makefile.in
2
+--- sudo-1.8.11p2.orig/Makefile.in	2014-10-07 22:26:20.000000000 +0200
3
++++ sudo-1.8.11p2/Makefile.in	2014-12-09 22:00:27.256934143 +0100
4
+@@ -62,7 +62,7 @@ SHELL = @SHELL@
5
+ SED = @SED@
6
+ 
7
+ INSTALL = $(SHELL) $(top_srcdir)/install-sh -c
8
+-INSTALL_OWNER = -o $(install_uid) -g $(install_gid)
9
++INSTALL_OWNER =
10
+ 
11
+ ECHO_N = @ECHO_N@
12
+ ECHO_C = @ECHO_C@