Bitmessage / PyBitmessage

Reference client for Bitmessage: a P2P encrypted decentralised communication protocol:
https://bitmessage.org/wiki/Main_Page
Other
2.82k stars 575 forks source link

Debian packaging #827

Closed elichai closed 3 years ago

elichai commented 8 years ago

That's what happens when I try to compile it for my Ubuntu

elichai2@Lenovo-G510:/media/elichai2/oldHDD/gits/pybitmessage$ sudo ./generate.sh 
Directory: /media/elichai2/oldHDD/gits/pybitmessage
gpg: WARNING: unsafe ownership on configuration file `/home/elichai2/.gnupg/gpg.conf'
Project Type: py
Project Version: 0.4.4
elichai2@Lenovo-G510:/media/elichai2/oldHDD/gits/pybitmessage$ sudo ./debian.sh 
sed: can't read puppypackage/pinstall.sh: No such file or directory
sed: can't read puppypackage/puninstall.sh: No such file or directory
sed: can't read debian/*.links: No such file or directory
rm -f pybitmessage \#* \.#* gnuplot* *.png debian/*.substvars debian/*.log
rm -fr deb.* debian/pybitmessage rpmpackage/`uname -m`
rm -f ../pybitmessage*.deb ../pybitmessage*.changes ../pybitmessage*.asc ../pybitmessage*.dsc
rm -f rpmpackage/*.src.rpm archpackage/*.gz archpackage/*.xz
rm -f puppypackage/*.gz puppypackage/*.pet slackpackage/*.txz
make: Nothing to be done for 'all'.
tar -cvf ../pybitmessage_0.4.4.orig.tar ../pybitmessage-0.4.4 --exclude-vcs --exclude 'debian'
tar: Removing leading `../' from member names
../pybitmessage-0.4.4/
../pybitmessage-0.4.4/src/translations/bitmessage_ar.pro
../pybitmessage-0.4.4/src/translations/bitmessage_ja.pro
../pybitmessage-0.4.4/src/translations/bitmessage_de.qm
../pybitmessage-0.4.4/src/translations/bitmessage_cs.pro
../pybitmessage-0.4.4/src/translations/bitmessage_eo.pro
../pybitmessage-0.4.4/src/translations/bitmessage_de.ts
../pybitmessage-0.4.4/src/translations/bitmessage_zh_cn.pro
../pybitmessage-0.4.4/src/translations/bitmessage_zh_cn.qm
../pybitmessage-0.4.4/src/translations/bitmessage_no.ts
../pybitmessage-0.4.4/src/translations/bitmessage_fr.ts
../pybitmessage-0.4.4/src/translations/bitmessage_ar.ts
../pybitmessage-0.4.4/src/translations/bitmessage_nl.ts
../pybitmessage-0.4.4/src/bitmessagemain.py
../pybitmessage-0.4.4/src/class_sqlThread.py
../pybitmessage-0.4.4/src/shared.py
../pybitmessage-0.4.4/src/debug.py
../pybitmessage-0.4.4/src/api.py
../pybitmessage-0.4.4/src/class_outgoingSynSender.py
../pybitmessage-0.4.4/src/class_singleListener.py
../pybitmessage-0.4.4/debian.sh
../pybitmessage-0.4.4/COPYING
../pybitmessage-0.4.4/configure
../pybitmessage-0.4.4/LICENSE
../pybitmessage-0.4.4/puppypackage/
../pybitmessage-0.4.4/puppypackage/icon14.xpm
../pybitmessage-0.4.4/puppypackage/pybitmessage-0.3.5.pet.specs
../pybitmessage-0.4.4/puppypackage/pybitmessage-0.4.4.pet.specs
../pybitmessage-0.4.4/generate.sh
../pybitmessage-0.4.4/ebuild.sh
../pybitmessage-0.4.4/man/
../pybitmessage-0.4.4/man/pybitmessage.1.gz
../pybitmessage-0.4.4/slackpackage/
../pybitmessage-0.4.4/slackpackage/slack-desc
../pybitmessage-0.4.4/slackpackage/doinst.sh
../pybitmessage-0.4.4/rpmpackage/
../pybitmessage-0.4.4/rpmpackage/pybitmessage.spec
../pybitmessage-0.4.4/rpm.sh
../pybitmessage-0.4.4/INSTALL.md
gzip -f9n ../pybitmessage_0.4.4.orig.tar
dpkg-buildpackage: warning:     debian/changelog(l8): assuming long month name 'November'
LINE:  -- Bob Mottram (4096 bits) <bob@robotics.uk.to>  Sun, 2 November 2014 12:55:00 +0100
dpkg-buildpackage: source package pybitmessage
dpkg-buildpackage: source version 0.4.4-1
dpkg-buildpackage: source distribution utopic
dpkg-buildpackage: source changed by Bob Mottram (4096 bits) <bob@robotics.uk.to>
dpkg-buildpackage: host architecture amd64
 dpkg-source --before-build pybitmessage-0.4.4
dpkg-source: warning: pybitmessage-0.4.4/debian/changelog(l8): assuming long month name 'November'
LINE:  -- Bob Mottram (4096 bits) <bob@robotics.uk.to>  Sun, 2 November 2014 12:55:00 +0100
 debian/rules clean
debian/rules:10: *** missing separator (did you mean TAB instead of 8 spaces?).  Stop.
dpkg-buildpackage: error: debian/rules clean gave error exit status 2
mendaxi commented 8 years ago

When I try to compile on Debian it gives me something similar:

sed: can't read Makefile: No such file or directory
sed: can't read rpmpackage/pybitmessage.spec: No such file or directory
sed: can't read rpmpackage/pybitmessage.spec: No such file or directory
sed: can't read puppypackage/pinstall.sh: No such file or directory
sed: can't read puppypackage/puninstall.sh: No such file or directory
sed: can't read debian/*.links: No such file or directory
make: *** No rule to make target `clean'.  Stop.
make: *** No targets specified and no makefile found.  Stop.
mv: cannot stat ‘../pybitmessage’: No such file or directory
make: *** No rule to make target `sourcedeb'.  Stop.
dpkg-buildpackage: source package pybitmessage
dpkg-buildpackage: source version 0.4.4-1
dpkg-buildpackage: source distribution utopic
dpkg-buildpackage: source changed by Bob Mottram (4096 bits) <bob@robotics.uk.to>
dpkg-buildpackage: host architecture amd64
 dpkg-source --before-build PyBitmessage
 fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp
dh_clean
 dpkg-source -b PyBitmessage
dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../pybitmessage_0.4.4.orig.tar.{bz2,gz,lzma,xz}
dpkg-buildpackage: error: dpkg-source -b PyBitmessage gave error exit status 255

You need a passphrase to unlock the secret key for
user:
4096-bit RSA key, ID, created 2015

gpg: can't open `../pybitmessage_0.4.4-1_all.deb': No such file or directory
gpg: signing failed: file open error

You need a passphrase to unlock the secret key for
user:
4096-bit RSA key, ID, created 2015

gpg: can't open `../pybitmessage_0.4.4.orig.tar.gz': No such file or directory
gpg: signing failed: file open error
mv: cannot stat ‘../pybitmessage-0.4.4’: No such file or directory

Update: I'm stupid
mendaxi commented 8 years ago

Some clarification: I installed packagemonkey as detailed in INSTALL.md, perhaps something was deprecated?

mendaxi commented 8 years ago

The issue is residing in this:

debian/rules:10: *** missing separator (did you mean TAB instead of 8 spaces?).  Stop.
dpkg-buildpackage: error: debian/rules clean gave error exit status 2

Which corresponds to this in debian/rules:

build-stamp:
        dh_testdir
        touch build-stamp

Edit: It seems to be in lines 19 - 38 There are some spaces there that seem to be acting as quite the monkey wrench Anyone know what the expected output of running debian.sh is supposed to be?

mendaxi commented 8 years ago

After changing those lines locally and doing ./debian.sh, I get this as an output:

drwxr-xr-x     12 4.0K Dec  8 19:13 pybitmessage
-rw-r--r--      1 391K Dec  8 19:13 pybitmessage_0.4.4-1_all.deb
-rw-r--r--      1 1.7K Dec  8 19:13 pybitmessage_0.4.4-1_amd64.changes
-rw-r--r--      1 7.5K Dec  8 19:13 pybitmessage_0.4.4-1.debian.tar.xz
-rw-r--r--      1  990 Dec  8 19:13 pybitmessage_0.4.4-1.dsc
-rw-r--r--      1 627K Dec  8 19:13 pybitmessage_0.4.4.orig.tar.gz

pybitmessage:                       directory
pybitmessage_0.4.4-1_all.deb:       Debian binary package (format 2.0)
pybitmessage_0.4.4-1_amd64.changes: ASCII text
pybitmessage_0.4.4-1.debian.tar.xz: XZ compressed data
pybitmessage_0.4.4-1.dsc:           ASCII text
pybitmessage_0.4.4.orig.tar.gz:     gzip compressed data, max compression, from Unix
mendaxi commented 8 years ago

This could be a fix Also, I would recommend against using generate.sh

ghost commented 8 years ago

The problem is that ./generate.sh overwrites debian/rules with a version containing spaces, but ./debian.sh expects the file to contain tabs. I have no idea why it does that.

A simple workaround is to run git checkout debian/rules after running ./generate.sh.

navjotcis commented 3 years ago

I have added the Debian package building, please check maybe this will solve your problems. https://github.com/Bitmessage/PyBitmessage/pull/1675

g1itch commented 3 years ago

This is obsolete.