Browse Source

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>
lilik-openwrt-22.03
Gergely Kiss 10 years ago
committed by Steven Barth
parent
commit
983d20ee86
4 changed files with 143 additions and 0 deletions
  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 View File

@ -0,0 +1,95 @@
#
# Copyright (C) 2006-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=sudo
PKG_VERSION:=1.8.11p2
PKG_RELEASE:=1
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=doc/LICENSE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.sudo.ws/sudo/dist
PKG_MD5SUM:=84012b4871b6c775c957cd310d5bad87
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=sudo/host
include $(INCLUDE_DIR)/package.mk
define Package/sudo
SECTION:=admin
CATEGORY:=Administration
TITLE:=Delegate authority to run commands
URL:=http://www.sudo.ws/
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
endef
define Package/sudo/description
Sudo (su "do") allows a system administrator to delegate authority to
give certain users (or groups of users) the ability to run some (or
all) commands as root or another user while providing an audit trail of
the commands and their arguments.
endef
define Package/sudo/conffiles
/etc/sudoers
endef
CONFIGURE_ARGS+= \
--without-pam \
--disable-pam-session \
--with-editor=/bin/vi \
--without-lecture \
--disable-zlib
CONFIGURE_VARS+= \
sudo_cv_uid_t_len=10 \
sudo_cv_func_unsetenv_void=no
include $(INCLUDE_DIR)/host-build.mk
define Host/Compile
cd $(HOST_BUILD_DIR)/lib/util; \
$(MAKE) mksiglist; $(MAKE) mksigname
endef
define Host/Install
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
$(CP) $(HOST_BUILD_DIR)/lib/util/mksig{list,name} $(STAGING_DIR_HOST)/bin/
endef
$(eval $(call HostBuild))
define Package/sudo/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/sudo $(1)/usr/bin/
chmod 4755 $(1)/usr/bin/sudo
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/visudo $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc
$(CP) $(PKG_INSTALL_DIR)/etc/sudoers $(1)/etc/
chmod 0440 $(1)/etc/sudoers
$(INSTALL_DIR) $(1)/etc/sudoers.d
$(INSTALL_DIR) $(1)/usr/lib/sudo
$(CP) $(PKG_INSTALL_DIR)/usr/lib/sudo/*.so* $(1)/usr/lib/sudo/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/sudo.init $(1)/etc/init.d/sudo
endef
define Package/sudo/postinst
#!/bin/sh
[ -n "$$IPKG_INSTROOT" ] || {
/etc/init.d/sudo enable
/etc/init.d/sudo start
}
endef
$(eval $(call BuildPackage,sudo))

+ 11
- 0
admin/sudo/files/sudo.init View File

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

+ 25
- 0
admin/sudo/patches/010-cross-compile-fixes.patch View File

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

+ 12
- 0
admin/sudo/patches/020-no-owner-change.patch View File

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

Loading…
Cancel
Save