Commit 739c73ea authored by dcoutadeur dcoutadeur's avatar dcoutadeur dcoutadeur

adding sles packaging (#LEMONLDAP-986)


git-svn-id: svn://svn.forge.objectweb.org/svnroot/lemonldap/branches/lemonldap-ng_version_1_4-bugfixes@4920 1dbb9719-a921-0410-b57f-c3a383c2c641
parent e17df58f
INSTRUCTIONS FOR BUILDING on SLES
================================================================================
Pre-requisites
----------------------------------------------------------------
- have a SLES 12 SP1 system,
- up to date,
- with SDK repository available ((yast2 -> Software -> Software Repositories ->
Add -> Extensions and modules from Registration Server)
- have internet access (port 21, 80, 443)
- copy generation scripts to server: create-lemonldap-packages.sh and zypper-download
Build packages
----------------------------------
The build package can construct what is necessary:
- it can install basic dependencies needed to build things
- it can install LemonLDAP::NG build dependencies
- it can build perl dependencies, getting them from CPAN, creating
RPM thanks to CPAN2RPM tool, and installing them
- it can get available Red Hat LemonLDAP packages and rebuild them on
the fly for SLES
- it can generate a SLES package repository
Build script is auto-descriptive:
USAGE:
./create-lemonldap-packages.sh [pre] [iba] [ibu] [bde] [ble] [help]
[pre] - install PRErequisites
[iba] - Install BAsic dependencies
[ibu] - Install BUild dependencies
[bde] - Build DEpendencies packages
[ble] - Build LEmonldap
[bre] - Build REpository
[help] - print this help
Make it executable:
chmod +x create-lemonldap-packages.sh zypper-download
and launch in the same order:
./create-lemonldap-packages.sh pre
./create-lemonldap-packages.sh iba
./create-lemonldap-packages.sh ibu
./create-lemonldap-packages.sh bde
./create-lemonldap-packages.sh ble
Last target is optional:
./create-lemonldap-packages.sh bre
(it allows to create a repository with the desired packages
This diff is collapsed.
#! /bin/sh
# zypper-download
# Yum does have a download cache, but it does not download source rpms,
# and zypper is preferred.
# See: #348733 - zypper should have --download-only and --cache options
RPM_CACHE=${RPM_CACHE-/var/cache/zypp/archives}
if test $# -eq 0 -o "$1" = '-h' -o "$1" = "--help"; then
cat 1>&2 <<EOF
Usage: zypper-download [--download-only] [source] PACKAGE-NAME...
Crude script to download [source] rpms and cache them in $RPM_CACHE.
EOF
exit 2
fi
if test "$1" = "-d" -o "$1" = "--download-only"; then
ZYPPER_DOWNLOAD_ONLY=yes
shift;
fi
yesforce=-yf
if test "$1" == "source"; then
source=$1-
yesforce=
shift;
fi
caching_rpm=/usr/local/bin/rpm
cat > $caching_rpm <<EOF
#! /bin/sh
LANG=C
log=/tmp/zypper-download.log
date "+%b %e %T" | tr -d '\n' >> \$log
echo -n : >> \$log
last=\$(eval echo '\$'{\$#})
#echo "last:\$last" >> /tmp/zypper-download.log
#echo "all:\$@" >> /tmp/zypper-download.log
if test -n "\$last" && echo \$last | grep /var/adm/mount/AP_0x; then
mkdir -p $RPM_CACHE
cp -pv \$last $RPM_CACHE
echo -n caching \$(basename \$last) >> \$log
fi
if test -z "\$ZYPPER_DOWNLOAD_ONLY"; then
exec /bin/rpm "\$@"
fi
echo >> \$log
EOF
chmod +x $caching_rpm
export ZYPPER_DOWNLOAD_ONLY
zypper -n ${source}install ${yesforce} "$@"
#rm -f $caching_rpm
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment