938f45d2c238667c4585f08a4bc60df16f047161
[openafs-wiki.git] / HowToBuildOpenAfsRpmPackages.mdwn
1 # Building RPM packages for OpenAFS
2
3 The OpenAFS source tree contains an RPM spec file for building RPM packages.
4 Recent versions of OpenAFS have makefile targets to build the source
5 distribution tarballs and a source RPM package (srpm). After creating these
6 files, run the `rpmbuild` tool to create create the binary RPM packages.
7
8 The following commands show how to build RPM packages from a git checkout.  The
9 tools will create RPM packages from annotated git tags. Checkout a tag for the
10 desired version, then generated the source rpm, then run rpmbuild to build the
11 binaries RPM package files.
12
13     $ git clone git://git.openafs.org/openafs.git
14     $ cd openafs
15     $ git checkout openafs-stable-<version>
16     $ ./regen.sh
17     $ ./configure
18     $ make dist     # not make dest !
19     $ make sprm     #?? not "make srpm" ???
20     $ rpmbuild --rebuild -ba --define "_topdir $(pwd)/rpmbuild" packages/openafs-<version>-1.src.rpm
21
22 The packages will be created in the `rpmbuild/RPMS` directory.  See the RPM
23 spec file in src/packaging/RedHat for the OpenAFS `--define` options.
24
25 Comment: "make srpm" says: 
26
27     $ make srpm
28     (cd packages && ../src/packaging/RedHat/makesrpm.pl *-src.tar.bz2 *-doc.tar.bz2)
29     tar: Pattern matching characters used in file names
30     tar: Use --wildcards to enable pattern matching, or --no-wildcards to suppress this warning
31     tar: */configure.ac: Not found in archive
32     ...
33     tar: Exiting with failure status due to previous errors
34     Unable to unpack src tar ball
35
36 Using non-* names doesn't help:
37
38     $ (cd packages; ../src/packaging/RedHat/makesrpm.pl openafs-1.6.11pre1-15-g8f482-src.tar.bz2 openafs-1.6.11pre1-15-g8f482-doc.tar.bz2)
39     tar: Pattern matching characters used in file names
40     tar: Use --wildcards to enable pattern matching, or --no-wildcards to suppress this warning
41     tar: */configure.ac: Not found in archive
42     tar: Pattern matching characters used in file names
43     tar: Use --wildcards to enable pattern matching, or --no-wildcards to suppress this warning
44     tar: */src/packaging/RedHat: Not found in archive
45     tar: Pattern matching characters used in file names
46     tar: Use --wildcards to enable pattern matching, or --no-wildcards to suppress this warning
47     tar: */.version: Not found in archive
48     tar: Pattern matching characters used in file names
49     tar: Use --wildcards to enable pattern matching, or --no-wildcards to suppress this warning
50     tar: */build-tools: Not found in archive
51     tar: Exiting with failure status due to previous errors
52     Unable to unpack src tar ball