[LinuxCNC/linuxcnc PR#614] Added support for Devuan

未分类 bolang 5个月前 (10-15) 23次浏览

Issue #614 | 状态: 已关闭 | 作者: Centuriondan | 创建时间: 2019-06-18


These commits:
1) adds support for detecting Devuan GNU/Linux versions into the debian/configure script
2) fixes the “clean” stage so it doesn’t try to run autoconfig.sh (breaks building with pbuilder because deps are resolved after the clean stage.
– this meant making some of the clean steps result be ignored because it tries to clean files that haven’t yet been created.


评论 (7)

#1 – andypugh 于 2019-06-18

Are you sure about the “clean” changes? I have not noticed a problem with it, and it seems likely that the code was put in for a reason.


#2 – SebKuzminsky 于 2019-06-18

The autogen and configure steps produce the Makefile.inc file, without which $(MAKE) clean will fail.


#3 – SebKuzminsky 于 2019-06-18

I should also mention that we currently build packages using pbuilder and it works just fine, eg: http://buildbot.linuxcnc.org/buildbot/builders/4031.deb-stretch-rtpreempt-amd64/builds/800


#4 – Centuriondan 于 2019-06-18

> The autogen and configure steps produce the Makefile.inc file, without which $(MAKE) clean will fail.
That is why I made the “rm” commands result ignored by prefixing the “-”
Autogen gets run during the build phase anyway.

To me it seems bad form to run build operations in order to have generated files to clean up…


#5 – Centuriondan 于 2019-06-18

> I should also mention that we currently build packages using pbuilder and it works just fine, eg: http://buildbot.linuxcnc.org/buildbot/builders/4031.deb-stretch-rtpreempt-amd64/builds/800

Interesting…. because for me it fails because the configure step fails due to missing dependencies. Is your pbuilder environment populated with some of the dependencies already??


#6 – SebKuzminsky 于 2019-06-18

@Centuriondan and I spoke about this some on IRC and discovered a difference in how we build debs, that may be responsible for this problem.

The LinuxCNC Buildbot uses this package build process:

1. Configure source for the current distro: cd debian; ./configure
1. Install missing build dependencies: pbuilder-satisfydepends
1. Build source package: dpkg-buildpackage -S
1. Build binary package (in pbuilder): pbuilder build

In contrast, @Centuriondan tells me he uses git-buildpackage, using a process like this:

1. Configure source for the current distro: cd debian; ./configure
1. Build source & binary packages (in pbuilder): gbp buildpackage --git-pbuilder

However, i just tried building our master branch (without @Centuriondan’s PR) and it built fine. I ran these commands:

1. sudo git-pbuilder create
1. cd linuxcnc-dev
1. git checkout master
1. cd debian; ./configure uspace; cd ..
1. sudo gbp buildpackage --git-pbuilder --git-ignore-branch

This seemed to build the dsc on the host machine (not in pbuilder), similar to the process our buildbot uses. @Centuriondan, please correct me if i’m wrong in that assessment.

Building the dsc of course requires making clean, to ensure that any old build artifacts lying around in your working directory don’t get accidentally mixed in to the clean pbuilder build. My build machine has the linuxcnc build dependencies installed, which is why the dsc build worked. A clean pbuilder environment is expected to not have these dependencies installed, so if you somehow build the dsc inside pbuilder it’ll fail. This must be how @Centuriondan does his build, though i haven’t been able to replicate it.

The second commit in this PR (“fix clean routine”) breaks debian/rules clean by making it try to run make clean without running autogen and src/configure to create Makefile.inc. This results in an error:
~~~
$ fakeroot ./debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp
cd src && /usr/bin/make clean -s
Makefile:82: * Makefile.inc must specify RTPREFIX and other variables. Stop.
make: [debian/rules:47: clean] Error 2 (ignored)
rm -f Makefile.inc
rm -f src/config.log src/config.status
dh_clean
~~~
The make clean invocation errors out before cleaning up, and old object files and other junk is left behind in the build directory while constructing the source package. I think this current approach is a mistake.
I would welcome a PR with just the first commit (“Added support for Devuan”), but the second commit shouldn’t go in, as it currently exists. The Devuan support PR should be made against 2.8.


#7 – Centuriondan 于 2019-06-18

@SebKuzminsky Your right, it does build them locally first, but I don’t have ALL the deps installed locally. (And shouldn’t need them for a source build). FWIW, Devuan builds the source package from the source in a buildhost again without the deps being installed.

It still seem wrong to me to have make clean running autoconf to generate files it needs to delete.
my approach makes deletion of the generated files non-fatal if they fail because the files aren’t there.

That said, what I’ll have to do to for Devuan will be a derivation from LinuxCNC’s buildbot setup anyway.

I’ll resubmit the first commit as suggested.


原始Issue: https://github.com/LinuxCNC/linuxcnc/pull/614

喜欢 (0)