Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
(Re)Building Packages Generally and Dosemu specifically
(Re)Building Packages Generally and Dosemu specifically
I'm trying to rebuild the dosemu package on stretch.
Q1. I have found two references to follow, any guidance on whether one is more appropriate or not?
https://wiki.debian.org/BuildingTutoria ... ut_changes
https://www.debian.org/doc/manuals/main ... ld.en.html
Q2. Using either approach from above, and just trying to initially (re)build the package from source without making any changes I'm hitting the same issue.
What I have done...
apt-get install build-essential fakeroot devscripts
apt-get source dosemu
apt-get install build-dep dsoemu
then from the two different threads above I have tried
dpkg-buildpackage -us -uc
and
debuild -b -uc -us
both yield same (similar) result below.
<<
---------------------------------DONE compiling-------------------------------
Now you must install DOSEMU. Make sure you are root and:
make install
make[2]: Leaving directory '/home/develop1/dosemu-1.4.0.7+20130105+b028d3f/src'
make[1]: Leaving directory '/home/develop1/dosemu-1.4.0.7+20130105+b028d3f'
dh_auto_test -O--parallel
create-stamp debian/debhelper-build-stamp
fakeroot debian/rules binary
dh binary --parallel
create-stamp debian/debhelper-build-stamp
dh_testroot -O--parallel
dh_prep -O--parallel
dh_installdirs -O--parallel
/home/develop1/dosemu-1.4.0.7+20130105+b028d3f/debian/dirs: 1: /home/develop1/dosemu-1.4.0.7+20130105+b028d3f/debian/dirs: etc/dosemu/freedos: not found
dh_installdirs: debian/dirs (executable config) returned exit code 127
debian/rules:3: recipe for target 'binary' failed
make: *** [binary] Error 127
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1116:
<<
Is this really looking for /etc/dosemu/freedos OR is that meant to be a subfolder of the build folder?
- - - - -
Q1. I have found two references to follow, any guidance on whether one is more appropriate or not?
https://wiki.debian.org/BuildingTutoria ... ut_changes
https://www.debian.org/doc/manuals/main ... ld.en.html
Q2. Using either approach from above, and just trying to initially (re)build the package from source without making any changes I'm hitting the same issue.
What I have done...
apt-get install build-essential fakeroot devscripts
apt-get source dosemu
apt-get install build-dep dsoemu
then from the two different threads above I have tried
dpkg-buildpackage -us -uc
and
debuild -b -uc -us
both yield same (similar) result below.
<<
---------------------------------DONE compiling-------------------------------
Now you must install DOSEMU. Make sure you are root and:
make install
make[2]: Leaving directory '/home/develop1/dosemu-1.4.0.7+20130105+b028d3f/src'
make[1]: Leaving directory '/home/develop1/dosemu-1.4.0.7+20130105+b028d3f'
dh_auto_test -O--parallel
create-stamp debian/debhelper-build-stamp
fakeroot debian/rules binary
dh binary --parallel
create-stamp debian/debhelper-build-stamp
dh_testroot -O--parallel
dh_prep -O--parallel
dh_installdirs -O--parallel
/home/develop1/dosemu-1.4.0.7+20130105+b028d3f/debian/dirs: 1: /home/develop1/dosemu-1.4.0.7+20130105+b028d3f/debian/dirs: etc/dosemu/freedos: not found
dh_installdirs: debian/dirs (executable config) returned exit code 127
debian/rules:3: recipe for target 'binary' failed
make: *** [binary] Error 127
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1116:
<<
Is this really looking for /etc/dosemu/freedos OR is that meant to be a subfolder of the build folder?
- - - - -
Re: (Re)Building Packages Generally and Dosemu specifically
Why would you do that, because dosemu is available as debian package:k829king wrote:I'm trying to rebuild the dosemu package on stretch.
Code: Select all
$ aptitude search dosemu
p dosemu - DOS Emulator for Linux
Re: (Re)Building Packages Generally and Dosemu specifically
because I want to make a small change, maybe I should have posted in the developers forum.
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 72 times
Re: (Re)Building Packages Generally and Dosemu specifically
The Debian sources include freedos, look on the right side of the page: https://packages.debian.org/stretch/dosemu
Did "apt-get source dosemu" download and extract all four of those source files?
Did "apt-get source dosemu" download and extract all four of those source files?
MX Linux packager and developer
Re: (Re)Building Packages Generally and Dosemu specifically
yes, the apt-get source dosemu pulled down the four files including the orig-freedos.tar.bz2.
Should that command also expand the tars, or is that part of the build process?
I'm trying to understand when it says "/debian/dirs: etc/dosemu/freedos: not found"
does it mean "/etc/dosemu/freedos" not found
or an "etc/dosemu/freedos" subfolder under the build folder?
There is an /etc/dosemu/freedos folder, it only contains two files autoexec.bat and config.sys,
but then this what is the case in a non development unit where the dosemu (not source) package has been installed.
The majority of freedos tar file contents appear to end up in /usr/lib/dosemu/
There is an "etc" folder under the build folder but then there is no freedos subfolder under that?
If one was required shouldn't the build script create that?
Should that command also expand the tars, or is that part of the build process?
I'm trying to understand when it says "/debian/dirs: etc/dosemu/freedos: not found"
does it mean "/etc/dosemu/freedos" not found
or an "etc/dosemu/freedos" subfolder under the build folder?
There is an /etc/dosemu/freedos folder, it only contains two files autoexec.bat and config.sys,
but then this what is the case in a non development unit where the dosemu (not source) package has been installed.
The majority of freedos tar file contents appear to end up in /usr/lib/dosemu/
There is an "etc" folder under the build folder but then there is no freedos subfolder under that?
If one was required shouldn't the build script create that?
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 72 times
Re: (Re)Building Packages Generally and Dosemu specifically
Yes, the build process is supposed to handle all that stuff automatically. The "apt-get source" commands gets all the source files and extracts them correctly; the manual method is to download them and run "dpkg-source -x <whatever>.dsc".
Let me see if I can reproduce your build problem on my install.
Let me see if I can reproduce your build problem on my install.
MX Linux packager and developer
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 72 times
Re: (Re)Building Packages Generally and Dosemu specifically
It built successfully on my system. I use a different method of automatically installing the build-depends using pbuilder-satisfydepends, as you can see used in my build command in the build log. That way I don't have to to go through the hassle of adding and disabling repositories.
Build log: https://drive.google.com/open?id=1Wxb1M ... 6fZlPjnTzi
Build log: https://drive.google.com/open?id=1Wxb1M ... 6fZlPjnTzi
MX Linux packager and developer
Re: (Re)Building Packages Generally and Dosemu specifically
thankyou, started comparing the logs, answers one of my questions that it expects the "etc/dosemu/freedos/" folder under the build folder e.g. "debian/dosemu/etc/dosemu/freedos/"
If I read correctly from log (though of course maybe something is not written to it) that as per runtime deployment the only thing that ends up in "/etc/dosemu/freedos" are two dos files that are actually symlinked off /debian/dosemu/usr/lib/dosemu/drive_z/.
Just as a test, I created the debian/dosemu/etc/dosemu/freedos folder as your log seems to suggest it's just used for that symlinking.
But when I tried "debuild -b -uc -us" again it fails in the same way and the debian/dosemu/etc/dosemu/freedos folder no longer exists.
I'll try starting over and using a new build folder.
If I read correctly from log (though of course maybe something is not written to it) that as per runtime deployment the only thing that ends up in "/etc/dosemu/freedos" are two dos files that are actually symlinked off /debian/dosemu/usr/lib/dosemu/drive_z/.
Just as a test, I created the debian/dosemu/etc/dosemu/freedos folder as your log seems to suggest it's just used for that symlinking.
But when I tried "debuild -b -uc -us" again it fails in the same way and the debian/dosemu/etc/dosemu/freedos folder no longer exists.
I'll try starting over and using a new build folder.
Re: (Re)Building Packages Generally and Dosemu specifically
So I created a new build folder.
Followed the instructions in https://wiki.debian.org/BuildingTutoria ... ut_changes
The pulling of the sources gave one a final response that I'm not clear on
<<
# apt-get source dosemu
Reading package lists... Done
Need to get 6,471 kB of source archives.
Get:1 http://ftp.uk.debian.org/debian stretch/contrib dosemu 1.4.0.7+20130105+b028d3f-2 (dsc) [2,414 B]
Get:2 http://ftp.uk.debian.org/debian stretch/contrib dosemu 1.4.0.7+20130105+b028d3f-2 (tar) [4,472 kB]
Get:3 http://ftp.uk.debian.org/debian stretch/contrib dosemu 1.4.0.7+20130105+b028d3f-2 (tar) [1,976 kB]
Get:4 http://ftp.uk.debian.org/debian stretch/contrib dosemu 1.4.0.7+20130105+b028d3f-2 (diff) [20.0 kB]
Fetched 6,471 kB in 1s (5,633 kB/s)
dpkg-source: info: extracting dosemu in dosemu-1.4.0.7+20130105+b028d3f
dpkg-source: info: unpacking dosemu_1.4.0.7+20130105+b028d3f.orig.tar.bz2
dpkg-source: info: unpacking dosemu_1.4.0.7+20130105+b028d3f.orig-freedos.tar.bz2
dpkg-source: info: unpacking dosemu_1.4.0.7+20130105+b028d3f-2.debian.tar.xz
dpkg-source: info: applying debianize.patch
dpkg-source: info: applying pc-tcp-packet-pad.patch
W: Download is performed unsandboxed as root as file 'dosemu_1.4.0.7+20130105+b028d3f-2.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
>>
if I try debuild -b -uc -us
I get same result as before, complaining there is no etc/dosemu/freedos folder
Followed the instructions in https://wiki.debian.org/BuildingTutoria ... ut_changes
The pulling of the sources gave one a final response that I'm not clear on
<<
# apt-get source dosemu
Reading package lists... Done
Need to get 6,471 kB of source archives.
Get:1 http://ftp.uk.debian.org/debian stretch/contrib dosemu 1.4.0.7+20130105+b028d3f-2 (dsc) [2,414 B]
Get:2 http://ftp.uk.debian.org/debian stretch/contrib dosemu 1.4.0.7+20130105+b028d3f-2 (tar) [4,472 kB]
Get:3 http://ftp.uk.debian.org/debian stretch/contrib dosemu 1.4.0.7+20130105+b028d3f-2 (tar) [1,976 kB]
Get:4 http://ftp.uk.debian.org/debian stretch/contrib dosemu 1.4.0.7+20130105+b028d3f-2 (diff) [20.0 kB]
Fetched 6,471 kB in 1s (5,633 kB/s)
dpkg-source: info: extracting dosemu in dosemu-1.4.0.7+20130105+b028d3f
dpkg-source: info: unpacking dosemu_1.4.0.7+20130105+b028d3f.orig.tar.bz2
dpkg-source: info: unpacking dosemu_1.4.0.7+20130105+b028d3f.orig-freedos.tar.bz2
dpkg-source: info: unpacking dosemu_1.4.0.7+20130105+b028d3f-2.debian.tar.xz
dpkg-source: info: applying debianize.patch
dpkg-source: info: applying pc-tcp-packet-pad.patch
W: Download is performed unsandboxed as root as file 'dosemu_1.4.0.7+20130105+b028d3f-2.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
>>
if I try debuild -b -uc -us
I get same result as before, complaining there is no etc/dosemu/freedos folder
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 72 times
Re: (Re)Building Packages Generally and Dosemu specifically
I don't use the "-b" flag, so does it still fail with just "debuild -uc -us"?"debuild -b -uc -us"
Code: Select all
W: Download is performed unsandboxed as root
MX Linux packager and developer
Re: (Re)Building Packages Generally and Dosemu specifically
Thankyou!
I was running the "apt-get source dosemu" as root (well sudo) because I'm just so used to doing that with apt-get install.
Cleared my build folder, ran "apt-get source dosemu" as normal user and no sandbox message.
Then ran "debuild -uc -us" and it built the .deb successfully.
Next... If I want to test the .deb that was built do I "apt-get remove dosemu" and then use gdebi with the .deb I have built?
I was running the "apt-get source dosemu" as root (well sudo) because I'm just so used to doing that with apt-get install.
Cleared my build folder, ran "apt-get source dosemu" as normal user and no sandbox message.
Then ran "debuild -uc -us" and it built the .deb successfully.
Next... If I want to test the .deb that was built do I "apt-get remove dosemu" and then use gdebi with the .deb I have built?
Re: (Re)Building Packages Generally and Dosemu specifically
Ok. I did "sudo apt-get remove dosemu" and used gdebi to install the .deb I just built that appeared to be ok from limited testing.
Next I made a small change, directly to the source with nano, which on re-reading https://wiki.debian.org/BuildingTutoria ... ource_code
Is where I went wrong, I should of been using the dpatch command.
The way I did it was make change directly, run debuild, got msg saying
<<
dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/dosemu_1.4.0.7+20130105+b028d3f-2.diff.54kcDG
dpkg-source: info: you can integrate the local changes with dpkg-source --commit
>>
which I did the later and ran debuild and all seems okay, though probably not the right way.
Next I made a small change, directly to the source with nano, which on re-reading https://wiki.debian.org/BuildingTutoria ... ource_code
Is where I went wrong, I should of been using the dpatch command.
The way I did it was make change directly, run debuild, got msg saying
<<
dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/dosemu_1.4.0.7+20130105+b028d3f-2.diff.54kcDG
dpkg-source: info: you can integrate the local changes with dpkg-source --commit
>>
which I did the later and ran debuild and all seems okay, though probably not the right way.
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 72 times
Re: (Re)Building Packages Generally and Dosemu specifically
I use the "dpkg-source --commit" all the time to generate patches from changes in source code. I believe that the guide that recommends dpatch is out of date with the modern source format 3.0 (quilt) that most packages are using by now.
Any changes you make inside the debian folder don't need patches, such as if you make any changes to the package configuration in the debian/rules file (assuming there is a configuration there). For example, I was thinking of porting over libaom-dev from deb-multimedia and then adding the configuration flag in the Debian ffmpeg-4.0.2 in rules to support the hot new AV1 codec, but then I read that's the unoptimized reference library and is horribly slow...probably not worth the trouble at the present time.
But I do make changes in various other files in /debian when I backport an upstream Debian kernel: https://build.opensuse.org/package/show ... x-libc-dev
which are detailed in debian/changelog--debian tarball can be downloaded here: https://download.opensuse.org/repositor ... ebian_9.0/
Any changes you make inside the debian folder don't need patches, such as if you make any changes to the package configuration in the debian/rules file (assuming there is a configuration there). For example, I was thinking of porting over libaom-dev from deb-multimedia and then adding the configuration flag in the Debian ffmpeg-4.0.2 in rules to support the hot new AV1 codec, but then I read that's the unoptimized reference library and is horribly slow...probably not worth the trouble at the present time.
But I do make changes in various other files in /debian when I backport an upstream Debian kernel: https://build.opensuse.org/package/show ... x-libc-dev
which are detailed in debian/changelog--debian tarball can be downloaded here: https://download.opensuse.org/repositor ... ebian_9.0/
MX Linux packager and developer
SOLVED: (Re)Building Packages Generally and Dosemu specifica
Thankyou. Managed to do what I wanted.
The only thing I noted was that if I made change to the dosemu source with nano or Kate and then straight tried to do a "dpkg-source --commit" some errors were issued (apologies didn't trap them) if get time will try again and capture. But if I then following that attempt run debuild, it (as found before) fails requesting a commit, and if I then try the commit it works..... and then I can debuild?
K.
The only thing I noted was that if I made change to the dosemu source with nano or Kate and then straight tried to do a "dpkg-source --commit" some errors were issued (apologies didn't trap them) if get time will try again and capture. But if I then following that attempt run debuild, it (as found before) fails requesting a commit, and if I then try the commit it works..... and then I can debuild?
K.
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 72 times
Re: SOLVED: (Re)Building Packages Generally and Dosemu speci
Yes, though technically the patch that gets created in debian/patches has a lot of boilerplate in the headers that should be filled in. But the most important line in the headers is that you explain what the patch is for, and the rest can be deleted if you're just making the changes for your own use.k829king wrote:Thankyou. Managed to do what I wanted.
The only thing I noted was that if I made change to the dosemu source with nano or Kate and then straight tried to do a "dpkg-source --commit" some errors were issued (apologies didn't trap them) if get time will try again and capture. But if I then following that attempt run debuild, it (as found before) fails requesting a commit, and if I then try the commit it works..... and then I can debuild?
K.
MX Linux packager and developer