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

README-Debian-package needs to be updated #64

Closed
pmelange opened this issue Oct 27, 2018 · 10 comments
Closed

README-Debian-package needs to be updated #64

pmelange opened this issue Oct 27, 2018 · 10 comments

Comments

@pmelange
Copy link
Contributor

The server svn.debian.org does not exist anymore. Therefore it is quite difficult to make debian packages.

Luckily I still had a copy of the svn debian-build repository. I have saved it as a tar in https://github.com/pmelange/Temporary-Files/blob/master/OLSRd-packages/debian/olsrd-debian-build.tar

@vchrizz
Copy link
Contributor

vchrizz commented Oct 30, 2018

@pmelange
Copy link
Contributor Author

Thanks for the link.

I have a fork of OLSRd, so I tried the following. Unfortunately it didn't work.

git clone <myForkedRepo.git>
cd olsrd
git checkout <myBranch>
mkdir debbuild
cd debbuild
git clone https://salsa.debian.org/debian/olsrd.git
mv olsrd/debian ..
cd ..
echo "1.0" > debian/source/format
vi debian/changelog # update to my version number
dpkg-buildpackage -uc -us

now instead of just making the debian packages, it seems to want to install olsrd. That is not what I want. Here is the error:

========= C O N F I G U R A T I O N - F I L E ============
olsrd uses the configfile /etc/olsrd/olsrd.conf
a default configfile. A sample RFC-compliance aimed
configfile can be found in olsrd.conf.default.rfc.
However none of the larger OLSRD using networks use that
so install a configfile with activated link quality exstensions
per default.
can be found at files/olsrd.conf.default.lq
==========================================================
mkdir -p /etc/olsrd
mkdir: cannot create directory ‘/etc/olsrd’: Permission denied
Makefile:168: recipe for target 'install_olsrd' failed
make[2]: *** [install_olsrd] Error 1
make[2]: Leaving directory '/home/pmelange/src/olsrd'
debian/rules:27: recipe for target 'override_dh_auto_install' failed
make[1]: *** [override_dh_auto_install] Error 2
make[1]: Leaving directory '/home/pmelange/src/olsrd'
debian/rules:15: recipe for target 'binary' failed
make: *** [binary] Error 2

The only files generated are olsrd_<version>.dsc and olsrd_<version>.tar.gz

Can you help any further? Would it make more sense to add the debian directoy to this repo?

@vchrizz
Copy link
Contributor

vchrizz commented Oct 30, 2018

mkdir: cannot create directory ‘/etc/olsrd’: Permission denied

had this problem too, thus made a PR: Fix Makefiles not to create files in root dir when building packages

but for building debian packages i considered not to do everything by hand and found this neat software debian-jenkins-glue to be very handy for this task.

@pmelange
Copy link
Contributor Author

jenkins-glue seems to be quite cool, but since my feature is in production, I don't really need it. I just need to make the packages once.

Also, as per the install instructions, I need sudo permission. This should not be a requirement to build debian packages.

I have added the Makefile changes from #63 in my branch, and it works. Thanks for the tip. I look forward to seeing that PR get merged.

But still, README-Debian-package is out of date. Would you say that the instructions above are ok? Or is there some git magic to just get the debian directory from https://salsa.debian.org/debian/olsrd.git and put it directly in my forked olsrd directory structure.

Or, would it be better to have the debian directory in the main olsrd repo?

@fhuberts what do you think?

@vchrizz
Copy link
Contributor

vchrizz commented Oct 31, 2018

Or, would it be better to have the debian directory in the main olsrd repo?

i thought about that too, but since there is a debian catalog "maintained" on salsa.debian.org, i would say its better to use this, so i use that git repo for packaging. a copy of that here would make hassles in having them both sync i guess.
its fairly recent on 0.9.6.1, i forked it and copied changes from github-olsrd repo over into upstream branch, added tag 0.9.6.2 and actually am using my forked repo for building packages.
one could do that too on the salsa-olsrd repo to update it...

@pmelange
Copy link
Contributor Author

I Cherry-picked your commit in #63 to my feature branch.

Also, I figured out how to get the debian directory with git magic. I think these instructions are better.

git clone <url to olsrd repo>
cd olsrd
git checkout <you branch> # This step is optional
git add remote debbuild https://salsa.debian.org/debian/olsrd.git 
git fetch debbuild
git checkout debbuild/master debian
echo "1.0" > debian/source/format
vi debian/changelog # Set the version number on top line
dpkg-buildpackage -uc -us
ls-l ../olsrd*.*

I would make the change to README-Debian-package. What do you think?

@vchrizz
Copy link
Contributor

vchrizz commented Oct 31, 2018

echo "1.0" > debian/source/format
this is often made i noticed but not really a good idea, see this link for details: https://wiki.debian.org/Projects/DebSrc3.0
in my opinion, better to let it on "3.0 (quilt)" and make everything around work with it, instead using hacks for quick&dirty fix.

@pmelange
Copy link
Contributor Author

Leaving it as "3.0 (quilt)" gave me the following error:

dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../olsrd_0.9.6.1.orig.tar.{bz2,gz,lzma,xz}
dpkg-buildpackage: error: dpkg-source -b olsrd gave error exit status 255

I would say that incompatibility with "3.0 (quilt)" should be it's own issue.

@vchrizz
Copy link
Contributor

vchrizz commented Oct 31, 2018

that error just tells you, it wants to build from a (previously created) tar file.
create that tarball beforehand and it should work.

@pmelange
Copy link
Contributor Author

resolved 7e33556

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

No branches or pull requests

2 participants