mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 13:53:31 +01:00
Workaround for building EL5 RPMs by specifying rpmbuild-md5. Updated old note about using static libevent when building RPMs.
This commit is contained in:
parent
72260cfa68
commit
0e778ac604
@ -24,13 +24,17 @@ EXTRA_DIST = \
|
|||||||
#install-data-local:
|
#install-data-local:
|
||||||
# $(INSTALL) -m 755 -d $(LOCALSTATEDIR)/lib/tor
|
# $(INSTALL) -m 755 -d $(LOCALSTATEDIR)/lib/tor
|
||||||
|
|
||||||
|
# Allows to override rpmbuild with rpmbuild-md5 from fedora-packager so that
|
||||||
|
# building for EL5 won't fail on https://bugzilla.redhat.com/show_bug.cgi?id=490613
|
||||||
|
RPMBUILD ?= rpmbuild
|
||||||
|
|
||||||
# Use automake's dist-gzip target to build the tarball
|
# Use automake's dist-gzip target to build the tarball
|
||||||
dist-rpm: dist-gzip
|
dist-rpm: dist-gzip
|
||||||
TIMESTAMP=$$(date +"%Y-%m-%d_%H.%M.%S"); \
|
TIMESTAMP=$$(date +"%Y-%m-%d_%H.%M.%S"); \
|
||||||
RPM_BUILD_DIR=$$(mktemp -d "/tmp/tor-rpm-build-$$TIMESTAMP-XXXX"); \
|
RPM_BUILD_DIR=$$(mktemp -d "/tmp/tor-rpm-build-$$TIMESTAMP-XXXX"); \
|
||||||
mkdir -p "$$RPM_BUILD_DIR"/{BUILD,RPMS,SOURCES/"tor-$(VERSION)",SPECS,SRPMS}; \
|
mkdir -p "$$RPM_BUILD_DIR"/{BUILD,RPMS,SOURCES/"tor-$(VERSION)",SPECS,SRPMS}; \
|
||||||
cp -fa "$(distdir).tar.gz" "$$RPM_BUILD_DIR"/SOURCES/; \
|
cp -fa "$(distdir).tar.gz" "$$RPM_BUILD_DIR"/SOURCES/; \
|
||||||
LIBS=-lrt rpmbuild -ba --define "_topdir $$RPM_BUILD_DIR" tor.spec; \
|
LIBS=-lrt $(RPMBUILD) -ba --define "_topdir $$RPM_BUILD_DIR" tor.spec; \
|
||||||
cp -fa "$$RPM_BUILD_DIR"/SRPMS/* .; \
|
cp -fa "$$RPM_BUILD_DIR"/SRPMS/* .; \
|
||||||
cp -fa "$$RPM_BUILD_DIR"/RPMS/* .; \
|
cp -fa "$$RPM_BUILD_DIR"/RPMS/* .; \
|
||||||
rm -rf "$$RPM_BUILD_DIR"; \
|
rm -rf "$$RPM_BUILD_DIR"; \
|
||||||
|
@ -2,18 +2,9 @@
|
|||||||
##
|
##
|
||||||
The process used to create the official rpms is as follows:
|
The process used to create the official rpms is as follows:
|
||||||
|
|
||||||
Download latest stable libevent from
|
You'll need to install libevent headers, usually located in package named
|
||||||
http://libevent.org/
|
libevent-devel. Alternatively, you could download latest libevent from
|
||||||
|
http://libevent.org/ but that shouldn't be necessary.
|
||||||
The first step of compiling libevent is to configure it as follows:
|
|
||||||
./configure --enable-static --disable-shared
|
|
||||||
|
|
||||||
Complete the "make" and "make install". You will need to be root,
|
|
||||||
or sudo -s, to complete the "make install".
|
|
||||||
|
|
||||||
Check for a successful universal binary of libevent.a in, by default,
|
|
||||||
/usr/local/lib by using the following command:
|
|
||||||
"file /usr/local/lib/libevent.a"
|
|
||||||
|
|
||||||
Download and Extract the latest tor source code from
|
Download and Extract the latest tor source code from
|
||||||
https://www.torproject.org/download
|
https://www.torproject.org/download
|
||||||
@ -25,6 +16,9 @@ make dist-rpm
|
|||||||
You should have at least two, maybe three, rpms. There should be the binary
|
You should have at least two, maybe three, rpms. There should be the binary
|
||||||
i386.rpm, a src.rpm, and on redhat/centos machines, a debuginfo.rpm.
|
i386.rpm, a src.rpm, and on redhat/centos machines, a debuginfo.rpm.
|
||||||
|
|
||||||
|
This step suffices unless you want to create RPMs for distros other than the
|
||||||
|
one you used for building.
|
||||||
|
|
||||||
|
|
||||||
## Instructions for building RPMs for multiple architectures or distributions
|
## Instructions for building RPMs for multiple architectures or distributions
|
||||||
## using 'mock'
|
## using 'mock'
|
||||||
@ -39,5 +33,22 @@ extension in the -r parameter):
|
|||||||
|
|
||||||
mock --rebuild -r fedora-17-x86_64 tor-X.Y.Z.src.rpm
|
mock --rebuild -r fedora-17-x86_64 tor-X.Y.Z.src.rpm
|
||||||
|
|
||||||
|
Building for EL5 from newer distro (e.g. EL6 or Fedora 17) will fail due to bug
|
||||||
|
(https://bugzilla.redhat.com/show_bug.cgi?id=490613).
|
||||||
|
Here's a workaround:
|
||||||
|
|
||||||
|
Before even building the source RPM, install fedora-packager and instruct
|
||||||
|
the build system to use rpmbuild-md5 like this:
|
||||||
|
|
||||||
|
yum install fedora-packager
|
||||||
|
export RPMBUILD=rpmbuild-md5
|
||||||
|
|
||||||
|
Then proceed as usual to create the source RPM and binary RPMs:
|
||||||
|
|
||||||
|
LIBS=-lrt ./configure
|
||||||
|
make dist-rpm
|
||||||
|
mock --rebuild -r epel-5-x86_64 tor-X.Y.Z.src.rpm
|
||||||
|
|
||||||
|
|
||||||
(Note: don't build under OpenVZ - it breaks unshare() syscall, which in turn
|
(Note: don't build under OpenVZ - it breaks unshare() syscall, which in turn
|
||||||
breaks mock. It could save you several hours.)
|
breaks mock. It could save you several hours.)
|
||||||
|
Loading…
Reference in New Issue
Block a user