Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add preliminary RPM support #4

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Add preliminary RPM support #4

wants to merge 11 commits into from

Conversation

cparedes
Copy link

@cparedes cparedes commented Oct 5, 2011

brew2deb making RPM's? WHAT?! :)

Could probably cherry pick a few of these changes (notably, could possibly remove credis-rpmtest, but it's a good test to see that it mostly works, so far.)

Had to split apart the libraries in lib/ to separate files, so it's easier to extend (if there's any need for other package managers.) Also -- added more require statements in the brew2deb binary.

@skull-squadron
Copy link

@cparedes: There's a point in one of the build scripts (%install section via fpm/templates/rpm.erb) that deletes CWD when attempting to re/create one of the build directories. It probably just needs to cd somewhere else before and cd back afterwards.

[root@hostname credis-rpmtest]# ../../bin/brew2deb 
which: no brew in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
==> Downloading http://credis.googlecode.com/files/credis-0.2.3.tar.g
##########                                                           ################                                                     #################                                                    #######################                                              ##################################                                   ########################################                             #############################################                        ###################################################                  #########################################################            ###############################################################      ####################################################################################################################################################################################################################################################################################### 100.0%
==> Extracting source
==> Compiling source
cc -g -O2 -Wall   -c -o credis-test.o credis-test.c
cc -c -fPIC -g -O2 -Wall  -o credis.o credis.c
ar -cvq libcredis.a credis.o
a - credis.o
cc -g -O2 -Wall   -o credis-test credis-test.o libcredis.a
cc -shared -Wl,-soname,libcredis.so -o libcredis.so credis.o
==> Installing binaries
==> Packaging into a .rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.0CfToc
+ umask 022
+ cd /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.GEVwyW
+ umask 022
+ cd /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm/BUILD
+ tar -zxf /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm/data.tar.gz
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.kNRJLG
+ umask 022
+ cd /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm/BUILD
+ '[' /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm/BUILD '!=' / ']'
+ rm -rf /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm/BUILD 
++ dirname /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm/BUILD
+ mkdir -p /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm
+ mkdir /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ /usr/lib/rpm/check-buildroot
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
+ /usr/lib/rpm/redhat/brp-compress
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
+ /usr/lib/rpm/brp-python-bytecompile
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
+ /usr/lib/rpm/redhat/brp-python-hardlink
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
+ /usr/lib/rpm/redhat/brp-java-repack-jars
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Processing files: libcredis-0.2.3+github1-1.x86_64
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm/BUILD
warning: Could not canonicalize hostname: hostname.localdomain
Wrote: /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm/SRPMS/libcredis-0.2.3+github1-1.src.rpm
Wrote: /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm/RPMS/x86_64/libcredis-0.2.3+github1-1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.YjLb1X
+ umask 022
+ cd /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm/BUILD
+ rm -rf /root/brew2deb/packages/credis-rpmtest/pkg/build-rpm-libcredis-0.2.3+github1.x86_64.rpm/BUILD
+ exit 0
Created /root/brew2deb/packages/credis-rpmtest/pkg/libcredis-0.2.3+github1.x86_64.rpm
[root@hostname pkg]# rpm -Uvh  pkg/libcredis-0.2.3+github1.x86_64.rpm 
Preparing...                                                         ########################################### [100%]
   1:libcredis                                                       ########################################### [100%]
[root@hostname pkg]# rpm -ql libcredis
/

( Disposable CentOS 6.2 x86_64 vm - system ruby, rubygems, git, ruby-devel & development tools group)

Update: for grins created a build user, same error.

@skull-squadron
Copy link

Simplest fix: Latest fpm master works like a charm.

[build@hostname pkg]$ sudo rpm -Uvh libcredis-0.2.3+github1-1.x86_64.rpm 
Preparing...                                                          ########################################### [100%]
   1:libcredis                                                        ########################################### [100%]
[build@hostname pkg]$ rpm -ql libcredis
/usr/include/credis.h
/usr/lib/libcredis.a
/usr/lib/libcredis.so
/usr/share/doc/libcredis/README

tmm1 pushed a commit that referenced this pull request Jul 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants