From 2981c5f8aced8a4a3af72c5474584d8007292ace Mon Sep 17 00:00:00 2001 From: Automatic Build System Date: Fri, 5 Jan 2024 21:32:24 +0100 Subject: [PATCH] automatic rebuild by autodist [release 1.4.3-4mamba;Sun Aug 18 2013] --- README.md | 3 ++ cpu-1.4.3-gcc4.patch | 12 +++++++ cpu-1.4.3-ldap.patch | 12 +++++++ cpu.spec | 78 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 105 insertions(+) create mode 100644 cpu-1.4.3-gcc4.patch create mode 100644 cpu-1.4.3-ldap.patch create mode 100644 cpu.spec diff --git a/README.md b/README.md index 8af013a..41800ec 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # cpu +CPU is an LDAP user management tool written in C and loosely based on FreeBSD's pw(8). +The goal of CPU is to be a suitable replacement of the useradd/usermod/userdel utilities for administrators using an LDAP backend and wishing to have a suite of command line tools for doing the administration. + diff --git a/cpu-1.4.3-gcc4.patch b/cpu-1.4.3-gcc4.patch new file mode 100644 index 0000000..530dfd7 --- /dev/null +++ b/cpu-1.4.3-gcc4.patch @@ -0,0 +1,12 @@ +diff -ur cpu-1.4.3/src/plugins/ldap/commandline.c cpu-1.4.3-mychanges/src/plugins/ldap/commandline.c +--- cpu-1.4.3/src/plugins/ldap/commandline.c 2004-01-11 22:31:02.000000000 -0700 ++++ cpu-1.4.3-mychanges/src/plugins/ldap/commandline.c 2005-12-11 14:06:19.000000000 -0700 +@@ -83,7 +83,7 @@ + if (passent == NULL) + return -1; + bzero (passent, sizeof (struct cpass)); +- (int) passent->sp_lstchg = passent->sp_min = passent->sp_max = -10; ++ passent->sp_lstchg = (int) (passent->sp_min = passent->sp_max = -10); + passent->sp_warn = passent->sp_inact = passent->sp_expire = -10; + passent->sp_flag = -10; + passent->pw_gid = -10; diff --git a/cpu-1.4.3-ldap.patch b/cpu-1.4.3-ldap.patch new file mode 100644 index 0000000..411013d --- /dev/null +++ b/cpu-1.4.3-ldap.patch @@ -0,0 +1,12 @@ +diff -Nru cpu-1.4.3.orig/src/plugins/ldap/ld.c cpu-1.4.3/src/plugins/ldap/ld.c +--- cpu-1.4.3.orig/src/plugins/ldap/ld.c 2004-01-12 05:47:37.000000000 +0100 ++++ cpu-1.4.3/src/plugins/ldap/ld.c 2008-04-02 02:43:29.000000000 +0200 +@@ -803,7 +803,7 @@ + return -10; + if (gid != NULL) + { +- gid = ldap_get_values (ld, pos, gid)[0]; ++ gid = ldap_get_values (ld, pos, gid); + if (gid != NULL) + return atoi (gid); + else diff --git a/cpu.spec b/cpu.spec new file mode 100644 index 0000000..0af3a9c --- /dev/null +++ b/cpu.spec @@ -0,0 +1,78 @@ +Name: cpu +Version: 1.4.3 +Release: 4mamba +Summary: Ldap aware command like useradd, userdel, usermod and others +Group: System/Tools +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://cpu.sourceforge.net/ +Source: http://downloads.sourceforge.net/sourceforge/cpu/cpu-%{version}.tar.bz2 +Patch0: %{name}-1.4.3-gcc4.patch +Patch1: %{name}-1.4.3-ldap.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libcrack-devel +BuildRequires: libopenldap-devel +BuildRequires: libopenssl-devel +BuildRequires: libsasl-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +CPU is an LDAP user management tool written in C and loosely based on FreeBSD's pw(8). +The goal of CPU is to be a suitable replacement of the useradd/usermod/userdel utilities for administrators using an LDAP backend and wishing to have a suite of command line tools for doing the administration. + +%prep +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%setup -q +%patch0 -p1 +%patch1 -p1 + +%build +./configure \ + --prefix=%{_prefix} \ + --sysconfdir=%{_sysconfdir}/cpu \ + --mandir=%{_mandir} \ + --datadir=%{_datadir}/cpu \ + --libdir=%{_libdir} \ + --with-passwd \ + --with-libcrack=/usr + +%make + +%install +make install DESTDIR=%{buildroot} sysconfdir=%{buildroot}%{_sysconfdir}/cpu + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_sbindir}/cpu +%config(noreplace) %{_sysconfdir}/cpu/cpu.conf +%{_mandir}/* +%dir %{_datadir}/cpu +%{_datadir}/cpu/* +%{_libdir}/libcpu*.so.* +%{_libdir}/libcpu*.so +%{_libdir}/libcpu*.a +%{_libdir}/libcpu*.la + +%changelog +* Sun Aug 18 2013 Automatic Build System 1.4.3-4mamba +- automatic rebuild by autodist + +* Wed Apr 02 2008 Silvan Calarco 1.4.3-3mamba +- specfile updates + +* Thu Oct 28 2004 Silvan Calarco 1.4.3-2qilnx +- removed libdb.so requirement + +* Wed Mar 17 2004 Silvan Calarco 1.4.3-1qilnx +- new version build + +* Tue Dec 09 2003 Silvan Calarco 1.4.2-1qilnx +- first build