]> git.sur5r.net Git - bacula/bacula/commitdiff
Add contrib-rpm
authorScott Barninger <scott@barninger.com>
Sun, 16 Jul 2006 17:58:42 +0000 (17:58 +0000)
committerScott Barninger <scott@barninger.com>
Sun, 16 Jul 2006 17:58:42 +0000 (17:58 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3148 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/platforms/contrib-rpm/README [new file with mode: 0644]
bacula/platforms/contrib-rpm/build_rpm.sh [new file with mode: 0755]
bacula/platforms/contrib-rpm/rpmkey.spec [new file with mode: 0644]

diff --git a/bacula/platforms/contrib-rpm/README b/bacula/platforms/contrib-rpm/README
new file mode 100644 (file)
index 0000000..498ac9b
--- /dev/null
@@ -0,0 +1,61 @@
+README file for bacula third party rpm contributors
+
+Sun Jul 16 2006
+D. Scott Barninger
+
+This document outlines the procedures to create rpm packages for
+bacula for platforms supported in the rpm spec file but not published
+on sourceforge. Contributors wishing to build and supply such rpm
+packages for release on the sourceforge project page should read this 
+documentation. Contributors should contact either Kern Sibbald <kern@sibbald.com>
+or Scott Barninger <barninger@fairfieldcomputers.com>.
+
+The general requirements to have contrib rpm packages published on the project 
+page are:
+
+1. Packages must be created using the current released source rpm and the
+shell script build_rpm.sh in this directory.
+2. The packager must sign all rpm packages with his/her personal gpg key
+and supply a copy of the public key as both a text file and as an rpm
+using the spec file rpmkey.spec in this directory.
+3. No modifications to either the bacula source code or spec file are
+permitted without consulting the project admins.
+4. There will be only one sanctioned packager for a given distribution.
+5. Contributors who submit two or more successful releases may be given
+release permissions to release their files directly to sourceforge. Prior to
+that you will need to coordinate the upload of your files to sourceforge with
+Kern or Scott to get them posted to the project page.
+
+How to create an rpmkey package:
+
+1. Create a plaintext copy of your gpg public key in a file named yourname.asc
+where yourname is in the form first initial and last name, ie. sbarninger.asc
+2. Edit the rpmkey.spec file and edit the line
+       %define pubkeyname yourname
+replacing yourname with your name as in step 1 above.
+3. Edit the rpmkey.spec file and edit the line
+       Packager: Your Name <your-email@site.org>
+inserting your name and email information.
+4. Copy your key file to your SOURCES directory and the spec file to your SPECS
+directory and create an rpm package.
+5. Both the key text file and the rpm will be published on sourceforge in your
+release package rpms-contrib-yourname.
+
+How to build a release:
+1. Copy the file build_rpm.sh to a temporary working directory and open it in a
+text editor. Examine and edit the configuration section of the script to match
+your platform and build options. Set permissions on the script to 755.
+3. Download the srpm you wish to build to the same directory.
+4. Execute the script by ./build_rpm.sh
+
+The script will build all the necessary packages, move them into the current
+working directory, rename them for your platform, and sign them with your key.
+
+Note: you must have a file named .rpmmacros in your home directory containing
+at least the following 2 lines:
+
+%_signature gpg
+%_gpg_name Your Name <your-email@site.org>
+
+The name and email information in the above line must correspond to the information
+in the key used to sign the packages when you generated the key.
diff --git a/bacula/platforms/contrib-rpm/build_rpm.sh b/bacula/platforms/contrib-rpm/build_rpm.sh
new file mode 100755 (executable)
index 0000000..a18ffa5
--- /dev/null
@@ -0,0 +1,113 @@
+#!/bin/bash
+
+# shell script to build bacula rpm release
+# copy this script into a working directory with the src rpm to build and execute
+# 16 Jul 2006 D. Scott Barninger
+
+# Copyright (C) 2006 Kern Sibbald
+# licensed under GPL-v2
+
+# signing rpms
+# Make sure you have a .rpmmacros file in your home directory containing the following:
+#
+# %_signature gpg
+# %_gpg_name Your Name <your-email@site.org>
+#
+# the %_gpg_name information must match your key
+
+
+# usage: ./build_rpm.sh
+
+###########################################################################################
+# script configuration section
+
+VERSION=1.38.11
+RELEASE=3
+
+# set to one of rh7,rh8,rh9,fc1,fc3,fc4,fc5,wb3,rhel3,rhel4,centos3,centos4,su9,su10,mdk,mdv
+PLATFORM=su10
+
+# MySQL version
+# set to empty (for MySQL 3), 4 or 5
+MYSQL=4
+
+# building wxconsole
+# if your platform does not support building wxconsole (wxWidgets >= 2.6)
+# delete the line [--define "build_wxconsole 1" \] below:
+
+# enter your name and email address here
+PACKAGER="Your Name <your-email@site.org>"
+
+# enter the full path to your RPMS output directory
+RPMDIR=/usr/src/packages/RPMS/i586
+
+# enter your arch string here (i386, i586, i686)
+ARCH=i586
+
+############################################################################################
+
+SRPM=bacula-$VERSION-$RELEASE.src.rpm
+
+# if your platform does not support wxconsole delete the line below
+# defining build_wxconsole
+echo Building MySQL packages for "$PLATFORM"...
+sleep 2
+rpmbuild --rebuild --define "build_${PLATFORM} 1" \
+--define "build_mysql${MYSQL} 1" \
+--define "contrib_packager ${PACKAGER}" \
+--define "build_wxconsole 1" \
+${SRPM}
+
+echo Building PostgreSQL packages for "$PLATFORM"...
+sleep 2
+rpmbuild --rebuild --define "build_${PLATFORM} 1" \
+--define "build_postgresql 1" \
+--define "contrib_packager ${PACKAGER}" \
+--define "nobuild_gconsole 1" ${SRPM}
+
+echo Building SQLite packages for "$PLATFORM"...
+sleep 2
+rpmbuild --rebuild --define "build_${PLATFORM} 1" \
+--define "build_sqlite 1" \
+--define "contrib_packager ${PACKAGER}" \
+--define "nobuild_gconsole 1" ${SRPM}
+
+# delete the updatedb package and any nodebug packages built
+rm -f ${RPMDIR}/bacula*debug*
+rm -f ${RPMDIR}/bacula-updatedb*
+
+# copy files to cwd and rename files to final upload names
+
+mv -f ${RPMDIR}/bacula-mysql-${VERSION}-${RELEASE}.${ARCH}.rpm \
+./bacula-mysql-${VERSION}-${RELEASE}.${PLATFORM}.${ARCH}.rpm
+
+mv -f ${RPMDIR}/bacula-postgresql-${VERSION}-${RELEASE}.${ARCH}.rpm \
+./bacula-postgresql-${VERSION}-${RELEASE}.${PLATFORM}.${ARCH}.rpm
+
+mv -f ${RPMDIR}/bacula-sqlite-${VERSION}-${RELEASE}.${ARCH}.rpm \
+./bacula-sqlite-${VERSION}-${RELEASE}.${PLATFORM}.${ARCH}.rpm
+
+mv -f ${RPMDIR}/bacula-mtx-${VERSION}-${RELEASE}.${ARCH}.rpm \
+./bacula-mtx-${VERSION}-${RELEASE}.${PLATFORM}.${ARCH}.rpm
+
+mv -f ${RPMDIR}/bacula-client-${VERSION}-${RELEASE}.${ARCH}.rpm \
+./bacula-client-${VERSION}-${RELEASE}.${PLATFORM}.${ARCH}.rpm
+
+mv -f ${RPMDIR}/bacula-gconsole-${VERSION}-${RELEASE}.${ARCH}.rpm \
+./bacula-gconsole-${VERSION}-${RELEASE}.${PLATFORM}.${ARCH}.rpm
+
+# now sign the packages
+echo Ready to sign packages...
+sleep 2
+rpm --addsign ./*.rpm
+
+echo
+echo Finished.
+echo
+ls
+
+# changelog
+# 16 Jul 2006 initial release
+
+
+
diff --git a/bacula/platforms/contrib-rpm/rpmkey.spec b/bacula/platforms/contrib-rpm/rpmkey.spec
new file mode 100644 (file)
index 0000000..52daff7
--- /dev/null
@@ -0,0 +1,48 @@
+# rpm public key package
+# Copyright (C) 2006 Kern Sibbald
+#
+#
+
+# replace the string yournam with your name
+# first initial and lastname, ie. sbarninger
+%define pubkeyname yourname
+
+# replace below with your name and email address
+Packager: Your Name <your-email@site.org>
+
+Summary: The %{pubkeyname} rpm public key
+Name: rpmkey-%{pubkeyname}
+Version: 0.1
+Release: 1
+License: GPL v2
+Group: System/Packages
+Source0: %{pubkeyname}.asc
+BuildArch: noarch
+BuildRoot: %{_tmppath}/%{name}-root
+
+%description
+The %{pubkeyname} rpm public key. If you trust %{pubkeyname} component
+and you want to import this key to the RPM database, then install this 
+RPM. After installing this package you may import the key into your rpm
+database, as root:
+
+rpm --import %{_libdir}/rpm/gnupg/%{pubkeyname}.asc
+
+%prep
+%setup -c -T a1
+
+%build
+
+%install
+mkdir -p %{buildroot}%{_libdir}/rpm/gnupg
+cp -a %{SOURCE0} %{buildroot}%{_libdir}/rpm/gnupg
+
+%files
+%defattr(-, root, root)
+%{_libdir}/rpm/gnupg/%{pubkeyname}.asc
+
+
+%changelog
+* Sun Jul 16 2006 D. Scott Barninger <barninger@fairfieldcomputers.com
+- initial spec file
+