Re: Need a Compiled CFEngine Agent Package on AIX 7 and 6

Xander Cage <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
my spec file for lmdb, if this is of any help...

root@aixbuildhostng: /home/packagebuilder/rpmbuild/SPECS # cat 
liblmdb-0.9.29-1.spec
Name:           liblmdb
Version:        0.9.29
Release:        1
Summary:        Lightning memory-mapped database library
License:        OpenLDAP Public License
Group:          Development/Libraries/C and C++
Url:            http://symas.com/mdb


#Git-Clone:     git://git.openldap.org/openldap mdb.master
Source0:         https://github.com/LMDB/lmdb/archive/LMDB_%version.tar.gz

BuildRoot:      %{_tmppath}/%name-%version-%release-build


Provides: liblmdb.a(liblmdb.so)
Provides: liblmdb.so

%define _libdir64 %{_prefix}/lib64

%description
The OpenLDAP's Lightning Memory-Mapped Database (LMDB)
LMDB is an ultra-fast, ultra-compact key-value data store developed by 
Symas for
the OpenLDAP Project. It uses memory-mapped files, so it has the read 
performance
of a pure in-memory database while still offering the persistence of 
standard
disk-based databases, and is only limited to the size of the virtual 
address space,
(it is not limited to the size of physical RAM).

The library is available as 32-bit and 64-bit.

%package -n %name-%version
Summary:        Shared library for Lightning Memory-Mapped Database (LMDB)
Group:          System/Libraries

%description -n %name-%version
LMDB is a Btree-based database management library with an API similar
to BerkeleyDB. The library is thread-aware and supports concurrent
read/write access from multiple processes and threads. The DB
structure is multi-versioned, and data pages use a copy-on-write
strategy, which also provides resistance to corruption and eliminates
the need for any recovery procedures. The database is exposed in a
memory map, requiring no page cache layer of its own.


%package devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %name = %version
Provides:       liblmdb.so

%description devel
The %name-devel package contains header files for developing
applications that use %name.


%prep
%setup -qn lmdb-LMDB_%version
cd libraries/liblmdb
mkdir ../32bit
mv * ../32bit
mv ../32bit .
mkdir 64bit
cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -)

%build
export CONFIG_SHELL=/usr/bin/ksh
export CONFIG_ENV_ARGS=/usr/bin/ksh

export CFLAGS="-DSYSV -D_AIX -D_ALL_SOURCE -DFUNCPROTO=15 -O 
-I/opt/freeware/include -DMDB_USE_ROBUST=0 -Wl,-lpthread 
-Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib"
export CXXFLAGS="${CFLAGS}"



cd libraries/liblmdb/64bit
# first build the 64-bit version
export OBJECT_MODE=64
export AR="/usr/bin/ar -X64"
export RANLIB="/usr/bin/ranlib -X64"
export NM="/usr/bin/nm -X64"
export CC="gcc -maix64"
export CXX="g++ -maix64"
export LD="/usr/bin/ld -b64"

/opt/freeware/bin/sed -i 's?libdir = $(exec_prefix)/lib?libdir = 
$(exec_prefix)/lib64?' Makefile

gmake %{?_smp_mflags} CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" 
CXXFLAGS="${CFLAGS}" LD="${LD}"  AR="${AR}" RANLIB="${RANLIB}" NM="${NM}"
rm liblmdb.a
$AR -q liblmdb.a liblmdb.so*

cd ../32bit
# now build the 32-bit version
export OBJECT_MODE=32
export AR="/usr/bin/ar -X32"
export RANLIB="/usr/bin/ranlib -X32"
export NM="/usr/bin/nm -X32"
export CC="gcc -maix32"
export CXX="g++ -maix32"
export LD="/usr/bin/ld -b32"

gmake %{?_smp_mflags} CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" 
CXXFLAGS="${CFLAGS}" LD="${LD}"  AR="${AR}" RANLIB="${RANLIB}" NM="${NM}"
rm liblmdb.a
$AR -q liblmdb.a liblmdb.so*

%install
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}

cd libraries/liblmdb/64bit
export OBJECT_MODE=64
export AR="/usr/bin/ar -X64"
export RANLIB="/usr/bin/ranlib -X64"
export NM="/usr/bin/nm -X64"
export CC="gcc -maix64"
export CXX="g++ -maix64"
export LD="/usr/bin/ld -b64"

gmake install DESTDIR=${RPM_BUILD_ROOT} CC="${CC}" CXX="${CXX}" 
CFLAGS="${CFLAGS}" CXXFLAGS="${CFLAGS}" LD="${LD}"  AR="${AR}" 
RANLIB="${RANLIB}" NM="${NM}" \
      prefix=%{_prefix}

(
  cd ${RPM_BUILD_ROOT}%{_bindir}
  for f in * ; do
    mv -f ${f} ${f}_64
  done
)

cd ../32bit
export OBJECT_MODE=32
export AR="/usr/bin/ar -X32"
export RANLIB="/usr/bin/ranlib -X32"
export NM="/usr/bin/nm -X32"
export CC="gcc -maix32"
export CXX="g++ -maix32"
export LD="/usr/bin/ld -b32"

gmake install DESTDIR=${RPM_BUILD_ROOT} CC="${CC}" CXX="${CXX}" 
CFLAGS="${CFLAGS}" CXXFLAGS="${CFLAGS}" LD="${LD}"  AR="${AR}" 
RANLIB="${RANLIB}" NM="${NM}" \
      prefix=%{_prefix}

(
  cd ${RPM_BUILD_ROOT}%{_libdir64}
  for f in *.a ; do
    /usr/bin/ar -X64 -x ${f}
  done

  cd ${RPM_BUILD_ROOT}%{_libdir}
  for f in *.a ; do
    /usr/bin/ar -X32 -x ${f}
  done
)

# add the 64-bit shared objects to the shared libraries containing already 
the
# 32-bit shared objects
/usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/liblmdb.a 
${RPM_BUILD_ROOT}%{_libdir64}/liblmdb.so*


%clean
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}


%files
%defattr(-,root,system,-)
%doc libraries/liblmdb/64bit/CHANGES
%doc libraries/liblmdb/64bit/COPYRIGHT
%doc libraries/liblmdb/64bit/LICENSE
%_libdir/*.a
%_libdir/*.so*
%_libdir64/*.so*
%_libdir64/*a*


%files devel
%defattr(-,root,system,-)
%_includedir/*


%changelog

On Thursday, March 24, 2022 at 2:58:22 PM UTC+1 Xander Cage wrote:

> there is no lmdb package for aix, you need to do it yourself also.
>
> On Wednesday, March 23, 2022 at 10:47:38 AM UTC+1 [email protected] wrote:
>
>> Can I get the output of rpm -qa from the sever?
>>
>> On Tuesday, March 15, 2022 at 1:45:31 PM UTC+5:30 Xander Cage wrote:
>>
>>> root@nimvie: /root # oslevel -s
>>> 7300-00-01-2148
>>>
>>> root@nimvie: /root # rpm -qi cfengine
>>> Name        : cfengine
>>> Version     : 3.18.1
>>> Release     : itsv
>>> Architecture: ppc
>>> Install Date: Fri Feb  4 08:31:02 CET 2022
>>> Group       : Applications/System
>>> Size        : 10363182
>>> License     : GPLv2+
>>> Signature   : (none)
>>> Source RPM  : cfengine-3.18.1-itsv.src.rpm
>>> Build Date  : Fri Feb  4 08:18:36 CET 2022
>>> Build Host  : aixbuildhostng
>>> URL         : http://www.cfengine.org/
>>> Summary     : A systems administration tool for networks
>>> Description :
>>> Cfengine, or the configuration engine is an agent/software robot and a
>>> very high level language for building expert systems to administrate
>>> and configure large computer networks. Cfengine uses the idea of
>>> classes and a primitive form of intelligence to define and automate
>>> the configuration and maintenance of system state, for small to huge
>>> configurations. Cfengine is designed to be a part of a computer immune
>>> system.
>>>
>>>
>>> On Tuesday, March 15, 2022 at 9:13:00 AM UTC+1 Xander Cage wrote:
>>>
>>>> i am buildding cfengine rpms for years,  this is not rocket 
>>>> science...so just do it
>>>>
>>>> On Tuesday, March 15, 2022 at 7:29:31 AM UTC+1 [email protected] 
>>>> wrote:
>>>>
>>>>> Any one having a compiled agent package for Aix 6,7
>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/8a1b827e-07e5-4360-955d-7c1c4f7edd8fn%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.