summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-apps/utempter
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-apps/utempter')
-rw-r--r--sys-apps/utempter/Manifest1
-rw-r--r--sys-apps/utempter/files/utempter-0.5.5.6-build.patch11
-rw-r--r--sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch38
-rw-r--r--sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch22
-rw-r--r--sys-apps/utempter/metadata.xml6
-rw-r--r--sys-apps/utempter/utempter-0.5.5.6.ebuild57
6 files changed, 135 insertions, 0 deletions
diff --git a/sys-apps/utempter/Manifest b/sys-apps/utempter/Manifest
new file mode 100644
index 000000000000..c2858cdd5e7c
--- /dev/null
+++ b/sys-apps/utempter/Manifest
@@ -0,0 +1 @@
+DIST utempter-0.5.5-6.src.rpm 21099 SHA256 617c28d579fa54349b8a706e8346c2442f2ef39523db7e0501701a0919651f3c
diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-build.patch b/sys-apps/utempter/files/utempter-0.5.5.6-build.patch
new file mode 100644
index 000000000000..8fbfb111196f
--- /dev/null
+++ b/sys-apps/utempter/files/utempter-0.5.5.6-build.patch
@@ -0,0 +1,11 @@
+--- Makefile
++++ Makefile
+@@ -37,7 +37,7 @@
+ ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR)
+
+ $(SHAREDLIB): utmpintf.os
+- $(CC) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc
++ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc
+
+ utmpintf.o: utmpintf.c utempter.h
+
diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch b/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch
new file mode 100644
index 000000000000..8644db837f4a
--- /dev/null
+++ b/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch
@@ -0,0 +1,38 @@
+--- utempter-0.5.5/utempter.c.mps 2004-12-11 14:54:06.000000000 +0100
++++ utempter-0.5.5/utempter.c 2004-12-11 14:57:46.000000000 +0100
+@@ -11,7 +11,9 @@
+ #include <sys/stat.h>
+ #include <sys/sysmacros.h>
+ #include <utmp.h>
++#ifndef __UCLIBC__
+ #include <utmpx.h>
++#endif
+ #include <unistd.h>
+
+ static void usage(void) {
+@@ -82,7 +84,11 @@
+ }
+
+ int main(int argc, const char ** argv) {
++#ifndef __UCLIBC__
+ struct utmpx utx;
++#else
++ struct utmp utx;
++#endif
+ int add;
+ const char * device, * host;
+ struct passwd * pw;
+@@ -154,8 +160,13 @@
+
+ gettimeofday(&utx.ut_tv, NULL);
+
++#ifndef __UCLIBC__
+ pututxline(&utx);
+ updwtmpx(_PATH_WTMP, &utx);
++#else
++ pututline(&utx);
++ updwtmp(_PATH_WTMP, &utx);
++#endif
+
+ return 0;
+ }
diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch b/sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch
new file mode 100644
index 000000000000..123c77eb357c
--- /dev/null
+++ b/sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch
@@ -0,0 +1,22 @@
+--- Makefile.orig 2005-04-15 08:54:32.000000000 -0400
++++ Makefile 2005-04-15 08:56:17.000000000 -0400
+@@ -5,6 +5,10 @@
+ CVSROOT=$(shell cat CVS/Root)
+ # major number of the .so lib
+ SOMAJOR = 0
++# minor number of the .so lib
++SOMINOR = 5
++# micro number of the .so lib
++SOMICRO = 5
+
+ SHAREDLIB = lib$(NAME).so
+ SONAME = $(SHAREDLIB).$(SOMAJOR)
+@@ -29,6 +33,8 @@
+ install -m 644 utempter.h $(RPM_BUILD_ROOT)/usr/include
+ install -m 644 $(SHAREDLIB) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(VERSION)
+ ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB)
++ ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR).$(SOMINOR)
++ ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR)
+
+ $(SHAREDLIB): utmpintf.os
+ $(CC) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc
diff --git a/sys-apps/utempter/metadata.xml b/sys-apps/utempter/metadata.xml
new file mode 100644
index 000000000000..5aafc105dd09
--- /dev/null
+++ b/sys-apps/utempter/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <herd>x11</herd>
+</pkgmetadata>
diff --git a/sys-apps/utempter/utempter-0.5.5.6.ebuild b/sys-apps/utempter/utempter-0.5.5.6.ebuild
new file mode 100644
index 000000000000..56c86ef66878
--- /dev/null
+++ b/sys-apps/utempter/utempter-0.5.5.6.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit rpm eutils user
+
+MY_P=${P%.*}-${PV##*.}
+S=${WORKDIR}/${P%.*}
+DESCRIPTION="App that allows non-privileged apps to write utmp (login) info"
+HOMEPAGE="http://www.redhat.com/"
+SRC_URI="mirror://gentoo/${MY_P}.src.rpm"
+
+LICENSE="|| ( MIT LGPL-2 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE=""
+
+RDEPEND="!sys-libs/libutempter
+ !dev-python/utmp"
+
+pkg_setup() {
+ enewgroup utmp 406
+}
+
+src_unpack() {
+ rpm_src_unpack
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-soname-makefile-fix.patch
+ epatch "${FILESDIR}"/${P}-no_utmpx.patch
+ epatch "${FILESDIR}"/${P}-build.patch
+}
+
+src_compile() {
+ emake RPM_OPT_FLAGS="${CFLAGS} ${CPPFLAGS}" || die
+}
+
+src_install() {
+ emake \
+ RPM_BUILD_ROOT="${D}" \
+ LIBDIR=/usr/$(get_libdir) \
+ install || die
+ dobin utmp || die
+
+ fowners root:utmp /usr/sbin/utempter
+ fperms 2755 /usr/sbin/utempter
+}
+
+pkg_postinst() {
+ if [ -f "${ROOT}"/var/log/wtmp ] ; then
+ chown root:utmp "${ROOT}"/var/log/wtmp
+ chmod 664 "${ROOT}"/var/log/wtmp
+ fi
+ if [ -f "${ROOT}"/var/run/utmp ] ; then
+ chown root:utmp "${ROOT}"/var/run/utmp
+ chmod 664 "${ROOT}"/var/run/utmp
+ fi
+}