Bug #1984
closedCan not make debian packages directly with files from git repo
Description
- git clone git://github.com/Normation/rudder-packages.git
- cd rudder-packages/rudder-agent/
- dpkg-buildpackage
cd SOURCES && ./perl-prepare.sh
/home/jremond/packages/rudder-packages/rudder-agent/SOURCES/files/perl-5.12.1.tar.gz
I did not find the perl sources directory. It either means something failed during the download, or you are trying something funny.
make: *** [configure-stamp] Erreur 1
dpkg-buildpackage: erreur: debian/rules build a produit une erreur de sortie de type 2
- Patch1 (see files attached)
- dpkg-buildpackage
cd SOURCES && make && ./perl-prepare.sh
make1: entrant dans le répertoire « /home/sky/packages/rudder-packages/rudder-agent/SOURCES »
cd /tmp/tmp.ZpPXZfgAeS && git clone --depth 1 git@github.com:Normation/rudder-policy-templates.git
Cloning into rudder-policy-templates...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
make1: * [initial-promises] Erreur 128
make1: quittant le répertoire « /home/sky/packages/rudder-packages/rudder-agent/SOURCES »
make: * [configure-stamp] Erreur 2
dpkg-buildpackage: erreur: debian/rules build a produit une erreur de sortie de type 2
- Patch2
- dpkg-buildpackage
dh_install --SOURCEDIR=/home/sky/packages/rudder-packages/rudder-agent/SOURCES/perl-custom/opt rudder /opt
dh_install --SOURCEDIR=/home/sky/packages/rudder-packages/rudder-agent/SOURCES run-inventory /opt/rudder/bin
dh_install --SOURCEDIR=/home/sky/packages/rudder-packages/rudder-agent/SOURCES initial-promises /opt/rudder/share
cp: impossible d'évaluer « debian/tmp/initial-promises »: Aucun fichier ou dossier de ce type
dh_install: cp -a debian/tmp/initial-promises debian/rudder-agent//opt/rudder/share/ returned exit code 1
make: *** [binary-arch] Erreur 2
dpkg-buildpackage: erreur: fakeroot debian/rules binary a produit une erreur de sortie de type 2
Any idea ?
Files
Updated by Matthieu CERDA about 13 years ago
- % Done changed from 0 to 50
Indeed, the URLs used in the cloning commands are faulty : HTTP/S is to be used instead of SSH, this is fixed in the attached commit.
Updated by Jonathan CLARKE about 13 years ago
- Status changed from New to Released
- Assignee set to Jonathan CLARKE
- Target version set to 2.3.3
- % Done changed from 50 to 100
Hi Jean,
Thanks for these patches. We've applied the second patch to all the packages, so that we use the read-only URLs from GitHub. It seems we're getting 504 errors on these URLs sometimes, so we may revert to the git:// protocol (instead of https://), but they will remain generally usable. Thanks for pointing this out!
Regarding your first comment and patch, it seems the usage we intended was unclear. Our aim is to use the sames files for debian and RPM packaging, so we have a shared directory called "SOURCES" where we put all source files. Not all of them are stored in our git repo, to avoid bloating, so we have a simple Makefile that downloads and prepares them. So the expected workflow is to run "make" in this directory before starting to package.
I've added a README file to the repo, which you can see at https://github.com/Normation/rudder-packages, to clarify this. I hope this makes it easier to understand.
Please let us know if you find any other problems building packages!
Updated by Jean Remond about 13 years ago
Hi,
the "make" command is not functional as-is :
cd /tmp/tmp.xBmP131DPC && git clone --depth 1 https://github.com/Normation/rudder-policy-templates.git
Cloning into rudder-policy-templates...
remote: Counting objects: 4394, done.
remote: Compressing objects: 100% (2783/2783), done.
remote: Total 4394 (delta 1252), reused 4331 (delta 1197)
Receiving objects: 100% (4394/4394), 34.89 MiB | 1.71 MiB/s, done.
Resolving deltas: 100% (1252/1252), done.
cd /tmp/tmp.xBmP131DPC/rudder-policy-templates && git checkout <put branch or tag name here> || rm -rf /tmp/tmp.xBmP131DPC/rudder-policy-templates
/bin/sh: Syntax error: "||" unexpected
make: *** [initial-promises] Erreur 2
It seems that the GIT_BRANCH_RUDDER is not correctly defined.
./rudder-agent/SOURCES/Makefile:GIT_BRANCH_RUDDER = <put branch or tag name here>
Updated by Nicolas PERRON about 13 years ago
Updated by Nicolas PERRON almost 12 years ago
- Project changed from Rudder to 34
- Category deleted (
11)
Updated by Benoît PECCATTE over 9 years ago
- Project changed from 34 to Rudder
- Category set to Packaging