summaryrefslogtreecommitdiff
path: root/sys-apps/utempter
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-04 16:47:34 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-04 16:47:34 -0500
commitdda948891d3731927b821ce31f9d9a2d03ba20c5 (patch)
tree99cd40be4cbb0606260da212cd81b8ab2db9da9b /sys-apps/utempter
parenta3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7 (diff)
downloadbaldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.tar.gz
baldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.tar.xz
baldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.zip
Adding metadata
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-fix-build-system.patch41
-rw-r--r--sys-apps/utempter/files/utempter-0.5.5.6-no_gettimeofday.patch23
-rw-r--r--sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch38
-rw-r--r--sys-apps/utempter/metadata.xml9
-rw-r--r--sys-apps/utempter/utempter-0.5.5.6-r2.ebuild51
6 files changed, 163 insertions, 0 deletions
diff --git a/sys-apps/utempter/Manifest b/sys-apps/utempter/Manifest
new file mode 100644
index 000000000000..031d8a62a834
--- /dev/null
+++ b/sys-apps/utempter/Manifest
@@ -0,0 +1 @@
+DIST utempter-0.5.5-6.src.rpm 21099 BLAKE2B a4a8c53ab31d53ec56d60a16e5c1d3a0a2ec6c73c3c3025c15dfc389da75f969545392b46976017cfcde1d9f9ca974b14786bbf39709aebdda890df13a7866ed SHA512 81eeac830631922f2d1b2099a559b60bfd21818b38a524d3c5f61aec143b3e70e95a9ccc300f649dd81f515837fe3befaba6b93bb2e22767e71eee7acb711655
diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-fix-build-system.patch b/sys-apps/utempter/files/utempter-0.5.5.6-fix-build-system.patch
new file mode 100644
index 000000000000..83b41a04b25f
--- /dev/null
+++ b/sys-apps/utempter/files/utempter-0.5.5.6-fix-build-system.patch
@@ -0,0 +1,41 @@
+--- a/Makefile
++++ b/Makefile
+@@ -5,12 +5,14 @@
+ 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)
+
+-CFLAGS = -Wall $(RPM_OPT_FLAGS)
+-
+ TARGETS = $(NAME) utmp $(SHAREDLIB)
+
+ all: $(TARGETS)
+@@ -19,7 +21,7 @@
+ rm -f *.so utempter utmp *.os
+
+ %.os : %.c
+- $(CC) -c $(CFLAGS) -fPIC $< -o $@
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) -fPIC $< -o $@
+
+ install:
+ mkdir -p $(RPM_BUILD_ROOT)/usr/sbin
+@@ -29,9 +31,11 @@
+ 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
++ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc $(LIBS)
+
+ utmpintf.o: utmpintf.c utempter.h
+
diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-no_gettimeofday.patch b/sys-apps/utempter/files/utempter-0.5.5.6-no_gettimeofday.patch
new file mode 100644
index 000000000000..26bfdb9e9eb0
--- /dev/null
+++ b/sys-apps/utempter/files/utempter-0.5.5.6-no_gettimeofday.patch
@@ -0,0 +1,23 @@
+From: Brahmajit Das <brahmajit.xyz@gmail.com>
+Date: Sun, 28 May 2023 06:25:33 +0000
+Subject: [PATCH] Fix undeclared funtion gettimeofday.
+
+Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
+---
+ utempter.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/utempter.c b/utempter.c
+index 3f2f3a2..13214cc 100644
+--- a/utempter.c
++++ b/utempter.c
+@@ -11,6 +11,7 @@
+ #include <sys/stat.h>
+ #include <sys/sysmacros.h>
+ #include <utmp.h>
++#include <sys/time.h>
+ #ifndef __UCLIBC__
+ #include <utmpx.h>
+ #endif
+--
+2.40.1
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..b6fc7ea7d27e
--- /dev/null
+++ b/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch
@@ -0,0 +1,38 @@
+--- a/utempter.c
++++ b/utempter.c
+@@ -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/metadata.xml b/sys-apps/utempter/metadata.xml
new file mode 100644
index 000000000000..f308c62eb267
--- /dev/null
+++ b/sys-apps/utempter/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>
diff --git a/sys-apps/utempter/utempter-0.5.5.6-r2.ebuild b/sys-apps/utempter/utempter-0.5.5.6-r2.ebuild
new file mode 100644
index 000000000000..a8bc360e156a
--- /dev/null
+++ b/sys-apps/utempter/utempter-0.5.5.6-r2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PN="${P%.*}"
+MY_P="${MY_PN}-${PV##*.}"
+
+RPM_COMPRESS_TYPE=none
+inherit flag-o-matic rpm toolchain-funcs
+
+DESCRIPTION="App that allows non-privileged apps to write utmp (login) info"
+HOMEPAGE="https://www.redhat.com/"
+SRC_URI="mirror://gentoo/${MY_P}.src.rpm"
+S="${WORKDIR}/${MY_PN}"
+
+LICENSE="|| ( MIT LGPL-2 )"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~hppa ~mips ppc ppc64 ~s390 ~sparc x86"
+
+BDEPEND="acct-group/utmp"
+RDEPEND="
+ ${BDEPEND}
+ !sys-libs/libutempter
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.5.5.6-no_utmpx.patch
+ "${FILESDIR}"/${PN}-0.5.5.6-fix-build-system.patch
+ "${FILESDIR}"/${PN}-0.5.5.6-no_gettimeofday.patch
+)
+
+src_prepare() {
+ default
+ tc-export CC
+ append-cflags -Wall
+}
+
+src_install() {
+ local myemakeargs=(
+ LIBDIR="/usr/$(get_libdir)"
+ RPM_BUILD_ROOT="${ED}"
+ )
+
+ emake "${myemakeargs[@]}" install
+
+ dobin utmp
+
+ fowners root:utmp /usr/sbin/utempter
+ fperms 2755 /usr/sbin/utempter
+}