Modify

Opened 7 years ago

Closed 7 years ago

#4820 closed enhancement (fixed)

[new package] sudo

Reported by: colossal Owned by: nico
Priority: normal Milestone: Features Paradise
Component: packages Version:
Keywords: new package sudo Cc:

Description

Please add the sudo package. This makefile is for a 32bit machines only (sudo_cv_uid_t_len=10 is the string length of a unsigned long). I don't know if it is possible to detect this value when cross compiling, is there a flag that gets past when compiling for 64bit archs?

There are no patches or other files needed, just the makefile. Thanks.

#
# Copyright (C) 2008 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.7.0
PKG_RELEASE:=1
PKG_MD5SUM:=5fd96bba35fe29b464f7aa6ad255f0a6

PKG_SOURCE_URL:=http://www.sudo.ws/sudo/dist/
PKG_SOURCE:=sudo-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/sudo-$(PKG_VERSION)

include $(INCLUDE_DIR)/package.mk

define Package/sudo
  SECTION:= utils
  CATEGORY:=Utilities
  DEPENDS:= #+libpam
  TITLE:=delegate authority to run commands as root
  URL:=http://www.sudo.ws/
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 Build/Configure
  $(call Build/Configure/Default, sudo_cv_uid_t_len=10 --without-pam --disable-pam-session)
endef

define Package/sudo/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) -m0755 $(PKG_BUILD_DIR)/sudo $(1)/usr/bin/sudo

	$(INSTALL_DIR) $(1)/usr/sbin
	$(INSTALL_BIN) -m0111 $(PKG_BUILD_DIR)/visudo $(1)/usr/sbin/visudo

	$(INSTALL_DIR) $(1)/etc
	$(INSTALL_BIN) -m0440 $(PKG_BUILD_DIR)/sudoers $(1)/etc/sudoers

	$(INSTALL_DIR) $(1)/usr/lib
	$(INSTALL_BIN) -m0755 $(PKG_BUILD_DIR)/.libs/sudo_noexec.so $(1)/usr/lib/sudo_noexec.so
endef

$(eval $(call BuildPackage,sudo))

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by nico

  • Milestone set to Kamikaze Features Paradize
  • Owner changed from developers to nico
  • Status changed from new to assigned

comment:2 Changed 7 years ago by nico

  • Resolution set to fixed
  • Status changed from assigned to closed

Added in [15313], thanks!

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.