From 12b8b0fc4fb2225a2cd5376653508d4e3b1b5cb4 Mon Sep 17 00:00:00 2001 From: Rene Wagner Date: Mon, 31 Jul 2006 20:57:31 +0200 Subject: [PATCH] sudo: add 1.6.8p12-4 from Debian. Signed-off-by: Rene Wagner --- .../classes/debian-vampyre.bbclass | 16 +++++++++ .../sudo/files/install-binaries.patch | 17 ++++++++++ .../packages/sudo/sudo_1.6.8p12-4.bb | 33 +++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 org.handhelds.familiar/classes/debian-vampyre.bbclass create mode 100644 org.handhelds.familiar/packages/sudo/files/install-binaries.patch create mode 100644 org.handhelds.familiar/packages/sudo/sudo_1.6.8p12-4.bb diff --git a/org.handhelds.familiar/classes/debian-vampyre.bbclass b/org.handhelds.familiar/classes/debian-vampyre.bbclass new file mode 100644 index 0000000..17d9216 --- /dev/null +++ b/org.handhelds.familiar/classes/debian-vampyre.bbclass @@ -0,0 +1,16 @@ +PN = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[0] or 'defaultpkgname'}" +PV = "${@'-'.join((bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1] or '1.0').split('-')[:-1])}" +PR = "${@(bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1] or '1').split('-')[-1]}" + +DEBIAN_ARCHIVE ?= "main" +DEBIAN_BASE_URI = "${DEBIAN_MIRROR}/${DEBIAN_ARCHIVE}/${@bb.data.getVar('PN', d, 1)[0]}/${PN}" +SRC_URI = "${DEBIAN_BASE_URI}/${PN}_${PV}.orig.tar.gz \ + ${DEBIAN_BASE_URI}/${PN}_${PV}-${PR}.diff.gz;patch=1" + +do_install_append () { + mkdir -p ${D}${datadir}/doc/${PN} + rm -f ${D}${datadir}/doc/${PN}/changelog.Debian* + install -m 0644 debian/changelog ${D}${datadir}/doc/${PN}/changelog.Debian + gzip -9 ${D}${datadir}/doc/${PN}/changelog.Debian + [ -f debian/README.Debian ] && install -m 0644 debian/README.Debian ${D}${datadir}/doc/${PN}/ +} diff --git a/org.handhelds.familiar/packages/sudo/files/install-binaries.patch b/org.handhelds.familiar/packages/sudo/files/install-binaries.patch new file mode 100644 index 0000000..7797ccc --- /dev/null +++ b/org.handhelds.familiar/packages/sudo/files/install-binaries.patch @@ -0,0 +1,17 @@ +--- sudo-1.6.8p12/Makefile.in.orig 2006-07-31 16:48:29.000000000 +0200 ++++ sudo-1.6.8p12/Makefile.in 2006-07-31 16:49:18.000000000 +0200 +@@ -301,11 +301,11 @@ + $(DESTDIR)$(noexecdir) + + install-binaries: $(PROGS) +- $(INSTALL) -O $(install_uid) -G $(install_gid) -M 4111 -s sudo $(DESTDIR)$(sudodir)/sudo ++ $(INSTALL) -O $(install_uid) -G $(install_gid) -M 4111 sudo $(DESTDIR)$(sudodir)/sudo + rm -f $(DESTDIR)$(sudodir)/sudoedit +- ln $(DESTDIR)$(sudodir)/sudo $(DESTDIR)$(sudodir)/sudoedit ++ ln -s sudo $(DESTDIR)$(sudodir)/sudoedit + +- $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0111 -s visudo $(DESTDIR)$(visudodir)/visudo ++ $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0111 visudo $(DESTDIR)$(visudodir)/visudo + + install-noexec: sudo_noexec.la + $(LIBTOOL) --mode=install $(INSTALL) sudo_noexec.la $(DESTDIR)$(noexecdir) diff --git a/org.handhelds.familiar/packages/sudo/sudo_1.6.8p12-4.bb b/org.handhelds.familiar/packages/sudo/sudo_1.6.8p12-4.bb new file mode 100644 index 0000000..2bc3d05 --- /dev/null +++ b/org.handhelds.familiar/packages/sudo/sudo_1.6.8p12-4.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "Provide limited super user privileges to specific users" +LICENSE = "sudo" +HOMEPAGE = "http://www.sudo.ws/sudo/" +PRIORITY = "optional" +SECTION = "admin" + +inherit autotools debian-vampyre + +SRC_URI += "file://install-binaries.patch;patch=1 \ + file://autofoo.patch;patch=1 \ + file://noexec-link.patch;patch=1" + +EXTRA_OECONF = "--with-editor=/bin/vi \ + --with-env-editor \ + --disable-setresuid \ + --libexecdir=${libdir}/sudo \ + --with-secure-path='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin'" + +do_configure_prepend () { + rm -f acsite.m4 + if [ ! -e acinclude.m4 ]; then + cat aclocal.m4 > acinclude.m4 + fi +} + +python __anonymous () { + bb.data.setVarFlag("do_install", "fakeroot", 1, d) +} + +do_fix_perms () { + # fakeroot fucks this one up + chmod 0400 ${D}${sysconfdir}/sudoers +} -- 2.41.1