LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Blogs > jere21
User Name
Password

Notices


Rate this Entry

Backporting wine-development for Debian Jessie

Posted 08-14-2015 at 08:50 PM by jere21
Updated 04-05-2016 at 10:52 AM by jere21

I've started to make and upload backported packages of wine-development for Debian Jessie.

This is what I did for the first set, wine-development and khronos-api, a build-dependency of wine that is not in Jessie.
You'll still miss a lot relevant stuff, read the official page first.

EDIT 2015-08-29:
- Updated for my second upload to mentors.debian.org.
- Subscribe to packages.
EDIT 2015-11-02:
- Use apt-get source with option --download-only
EDIT 2016-01-13:
- Fix typo: wine[-development] uses debian/control.in (not debian/control)
EDIT: 2016-03-05:
- Fix pbuilderrc to use ccache
EDIT: 2016-04-05:
- Edit the configuration files in the home folder instead of /etc.

Links:

https://wiki.debian.org/BuildingFormalBackports
http://mentors.debian.net/intro-maintainers
https://wiki.debian.org/DebianMentorsFaq
https://wiki.debian.org/PbuilderTricks
https://wiki.debian.org/git-pbuilder



Basic settings


~/.bashrc
Code:
[...]
export DEBFULLNAME="Jens Reyer"
export DEBEMAIL="jre.winesim@..."

~/.gitconfig
Code:
[user]
	email = jre.winesim@...
	name = Jens Reyer
[credential]
	helper = cache --timeout=36000
[gui]
~/.devscripts
Code:
# GPG keyid to use (-k option)
DEBSIGN_KEYID='8826 EBE8 FCF7 26EE 182E  23D7 79C4 3E62 0B03 9B35'
~/.gbp.conf
Code:
[buildpackage]
# keyid to GPG sign tags with:
keyid = 0x0B039B35
~/.quiltrc
Code:
QUILT_PATCHES=debian/patches
QUILT_NO_DIFF_INDEX=1
QUILT_NO_DIFF_TIMESTAMPS=1
QUILT_REFRESH_ARGS="-p ab"
QUILT_DIFF_ARGS="--color=auto"
Add my GPG subkey for signing to the trustedkeys (needed e.g. for debdiff):

Code:
gpg --no-default-keyring -a --export 2B573076 | \
  gpg --no-default-keyring --keyring ~/.gnupg/trustedkeys.gpg --import -


Create base.cows

Code:
DIST=jessie ARCH=i386  git-pbuilder create
DIST=jessie ARCH=amd64 git-pbuilder create


Settings: pbuilder

/etc/pbuilderrc
Code:
MIRRORSITE=http://httpredir.debian.org/debian/


# Share system's apt cache
# TODO: Seems not to work properly. Sometimes re-downloads already existing
#       packages, but then fails (non-critical) to create an already existing
#       hardlink.
APTCACHE="/var/cache/apt/archives"

# EatMyData
EXTRAPACKAGES="$EXTRAPACKAGES eatmydata"

# ccache (optional)
# See https://wiki.debian.org/git-pbuilder#Tips
export CCACHE_DIR="/var/cache/pbuilder/ccache"
export PATH="/usr/lib/ccache:${PATH}"
EXTRAPACKAGES="$EXTRAPACKAGES ccache"
BINDMOUNTS="${CCACHE_DIR}"
# TODO: Use a  less privileged user, without ccache builds failing
#       randomly due to missing permissions.
# Execute once:
# $ sudo mkdir -p "$CCACHE_DIR"
# $ sudo chown jens:jens "$CCACHE_DIR"

# The user name of the user the build will run as. 
# Specifying this will enable the use of fakeroot inside pbuilder.
#BUILDUSERNAME="pbuilder"
export BUILDUSERNAME="jens"
export BUILDUSERID=1000

# Include a local repository with backported packages (khronos-api)
# You need to create the base.cow first and install apt-utils
# See https://wiki.debian.org/PbuilderTricks#How_to_include_local_packages_in_the_build
# ONLY FOR JESSIE BACKPORTS
OTHERMIRROR="$OTHERMIRROR|deb [trusted=yes] file:///home/jens/development/wine/jessie-bpo.upload ./"
BINDMOUNTS="/home/jens/development/wine/jessie-bpo.upload"
HOOKDIR="/home/jens/development/wine/pbuilder.hooks"
EXTRAPACKAGES="$EXTRAPACKAGES apt-utils" 

# ONLY FOR JESSIE BACKPORTS:
OTHERMIRROR="$OTHERMIRROR|deb http://httpredir.debian.org/debian jessie-backports main"

# Sign .changes and .dsc built with debuild (pdebuild, cowbuilder, git pbuilder, gbp buildpackage) with debsign
# Uses DEBSIGN_KEYID (export DEBSIGN_KEYID, else: from /etc/devscripts.conf, else ???)
# Fixed now, but used to work only for the dsc and the amd64 changes, but not the i386
# changes file.
AUTO_DEBSIGN=yes
Note: On Debian Stretch use at least 0.216 (currently in experimental), which fixes dependency resolving for pbuilder (Debian bug #786690). EDIT: fixed versions in all suites.


Add a hook to update the local mirror's "Packages" and synchronize the base.cow before building:

/home/jens/development/wine/pbuilder.hooks/D05deps
Code:
#!/bin/bash
LOCAL_REPO="/home/jens/development/wine/jessie-bpo.upload/"
(cd "$LOCAL_REPO"; apt-ftparchive packages . > Packages)
apt update

Enable the new hook, create a dummy Packages file and install the extrapackages in the chroots:

Code:
chmod +x /home/jens/development/wine/pbuilder.hooks/D05deps
LOCAL_REPO="/home/jens/development/wine/jessie-bpo.upload/"
touch "$LOCAL_REPO"/Packages
DIST=jessie ARCH=i386  git-pbuilder update --override-config
DIST=jessie ARCH=amd64 git-pbuilder update --override-config
Note: You can always wipe your local repo, but you have to make sure that at least a dummy Packages file exists.



Backport khronos-api


First off, subscribe to khronos-api on https://tracker.debian.org/pkg/khronos-api.


Get orig.tar and the source, and start on git branch jessie-backports

Code:
# Get the orig tarball and .dsc
apt-get source --download-only khronos-api/stretch
# Get the source that we actually use
gbp import-dscs --debsnap khronos-api
cd khronos-api/
git branch jessie-backports
git checkout jessie-backports
Note: based on this the build failed previously (it works now again). Then I used to workaround this:
dgit clone khronos-api stretch
git tag debian/0_svn29577-2
[...]
gbp buildpackage [...]
--git-upstream-branch=dgit/stretch



debian/control
Code:
[...]
Uploaders:
 Jens Reyer <jre.winesim@...>,
 [...]

Update changelog for bpo

Code:
git add debian/control
git commit -m "Add myself to Uploaders."
gbp dch \
  --debian-branch=jessie-backports \
  --full \
  --bpo \
  --release \
  --meta \
  --commit
# An editor window opens:
# - Verify entries.
# - Manually add: "Note: Build-dependency required by wine-development backports."

Build packages

khronos-api is a arch:all package, so I only had to build it on one architecture.

Code:
# Need build-dependencies on host system because of bug #786690
# (pdebuild fails to builds package with dpkg-dev 1.18.0)
# fixed in pbuilder 0.216
#sudo apt install doc-base texlive-generic-recommended

time gbp buildpackage \
   --git-pbuilder \
   --git-arch=amd64 \
   --git-dist=jessie \
   --git-debian-branch=jessie-backports \
   --git-no-create-orig \
   --git-tag \
   --git-sign-tags \
   -sa

Check your results:

Code:
$ debdiff ../khronos-api_0~svn29577-2.dsc ../khronos-api_0~svn29577-2~bpo8+1.dsc
[..., must only show the actual changes, no garbage!]
$ lintian --ftp-master-rejects ../khronos-api_0~svn29577-2~bpo8+1.dsc
$ lintian -I --pedantic -E ../khronos-api_0~svn29577-2~bpo8+1_amd64.changes
I: khronos-api changes: backports-changes-missing
W: khronos-api source: missing-license-paragraph-in-dep5-copyright mit (paragraph at line 27)
I: khronos-api source: debian-watch-file-is-missing
P: khronos-api: no-upstream-changelog
khronos-api has been added to the archive after Jessie. No point in shipping all changes. See https://bugs.debian.org/785084.
The other lintian hints are non-critical and also in the Stretch package, so these are also ok (TODO: Check what can be fixed there).



Add previously built packages (khronos-api) to a local repo


Code:
LOCAL_REPO="/home/jens/development/wine/jessie-bpo.upload/"
cp ../khronos-api_0~svn29577-2~bpo8+1_all.deb "$LOCAL_REPO"

Backport wine-development


I'm already subscribed to pkg-wine-party@lists.alioth.d.o (which is maintainer of wine-development), so no need to subscribe separately.

Get orig.tar and the source, and start on git branch jessie-backports-1.7.x

Code:
cd /home/jens/development/wine/wine
# Get the sources from Stretch (actually I used those from Sid
# to prepare the packages in advance):
apt-get source --download-only wine-development/stretch
# Setup clone of the Wine git repository at Alioth:
git clone git://git.debian.org/git/pkg-wine/wine.git
cd wine
# Make sure master HEAD is at the release currently in testing, not the
# latest packaging:
git checkout master
git reset --hard debian/1.7.50-1
# In the first run create the bpo packaging branch:
git branch jessie-backports-1.7.x
# And switch to it:
git checkout jessie-backports-1.7.x
# Later you just merge master into it
# (take care of changelog entries, keep every entry that was published
# (= uploaded to jessie-backports, mentors.d.o doesn't count)
#git merge master

debian/control.in
Code:
[...]
Uploaders:
 Jens Reyer <jre.winesim@...>,

Update changelog for bpo

Code:
git add debian/control.in
git commit -m "Add myself to Uploaders."
gbp dch \
  --debian-branch=jessie-backports-1.7.x \
  --upstream-branch=master \
  --full \
  --bpo \
  --release \
  --meta \
  --commit
# Fine-tune changelog:
#  [ Jens Reyer ]
#  * Rebuild for jessie-backports (closes: #793551).
#    Note: depends on backported khronos-api.#  * Add myself to uploaders.

If the build aborts because there are changes in the source to the orig.tar, you have to clean up your git repository first. Normally you just need to run "git reset --hard" (it is necessary, because the clean target deletes some files that were checked into git once). (Warning, the following commands delete data. Don't issue them, if you don't understand them!):

Code:
# Unapply patches and then remove the .pc directory
quilt pop -a
rm -rf .pc/
# Remove everything (including gitignored and new files, and hardreset. Then recreate d/control
git clean -d -x -f
git add .
git reset --hard
./debian/rules

Build amd64 packages and sign changes/dsc, force including source, include changes since version in jessie, create signed git tags

Code:
time gbp buildpackage \
  --git-pbuilder \
  --git-arch=amd64 \
  --git-dist=jessie \
  --git-debian-branch=jessie-backports-1.7.x \
  --git-no-create-orig \
  --git-compression=bzip2 \
  --git-tag \
  --git-sign-tags \
  -sa \
  -v1.7.29-4

Check your results:
Code:
$ debdiff \
    ../wine-development_1.7.50-1.dsc \
    ../wine-development_1.7.50-1~bpo8+1.dsc
[..., must only show the actual changes, no garbage!]
$ lintian --ftp-master-rejects ../wine-development_1.7.50-1~bpo8+1.dsc
$ lintian -I --pedantic -E ../wine-development_1.7.50-1~bpo8+1_amd64.changes

Save your results.
Arch all packages, the build log (misnamed in the i386 build), and the signed dsc and sources files will be overwritten by the i386 build otherwise.
Code:
LOCAL_REPO="/home/jens/development/wine/jessie-bpo.upload/"
mv ../*1.7.50-1~bpo8+1* "$LOCAL_REPO"
Build i386 packages

They are only needed for (local) testing purposes, but are not required for the upload.
(automatic signing doesn't work, because debsign is looking for an amd64 package (host architecture), see also the i386 *.build logfile which is called *amd64*.build.

Code:
git reset --hard
time gbp buildpackage \
  --git-pbuilder \
  --git-arch=i386 \
  --git-dist=jessie \
  --git-debian-branch=jessie-backports-1.7.x \
  --git-no-create-orig \
  --git-compression=bzip2 \
  -v1.7.29-4
Add (only) the arch i386 build results to the amd64 results:
Code:
LOCAL_REPO="/home/jens/development/wine/jessie-bpo.upload/"
mv ../*1.7.50-1~bpo8+1_i386* "$LOCAL_REPO"
Check with lintian and piuparts.


Check package in Jessie (amd64) (VirtualBox)


Host (your machine):

/home/jens/development/wine/apt.conf:
Code:
APT::FTPArchive::Release::Origin "jre";
Add built packages to a local repo:
(Make sure that only wanted files are in LOCAL_REPO before.)
Code:
LOCAL_REPO="/home/jens/development/wine/jessie-bpo.upload/"
cd $LOCAL_REPO
apt-ftparchive -c ../apt.conf packages . > Packages
apt-ftparchive -c ../apt.conf release . > Release

VM guest (Jessie):

Machine - Settings - Shared Folders:
Add $LOCAL_REPO as a shared (read-only, auto-mount) folder.
Devices - Shared Clipboard - Bidirectional

Code:
dpkg --add-architecture i386 && apt-get update
apt install adequate vim.tiny virtualbox-guest-utils
/etc/apt/sources.list
Code:
# Debian Jessie
deb http://httpredir.debian.org/debian/ jessie main contrib

# Debian Jessie Security Updates
deb http://security.debian.org/ jessie/updates main contrib

# Debian Jessie Backports
deb http://httpredir.debian.org/debian/ jessie-backports main contrib

# Local backported packages
deb [trusted=yes] file:///media/sf_jessie-bpo.upload/ ./
Note: In the beginning I missed to pin my local testing repository same as backports (100), therefore I first missed upgrade issues. (jre, 2015-09-04) Fixed by the following:

/etc/apt/preferences.d/local.repo.pref
Code:
Package: *
Pin: release o=jre
Pin-Priority: 100
Code:
dpkg --add-architecture i386 && apt update
apt install wine             # to rule out conflicts
apt install wine-development # install version from jessie
Basic tests in the VM:
Code:
# Update from jessie
apt install \
      wine-development/jessie-backports \
      wine32-development/jessie-backports \
      wine64-development/jessie-backports
# TODO: Simple update from jessie
apt install wine-development/jessie-backports
# Check with adequate
adequate wine-development
# Creates new wineprefix?
rm -rf ~/.wine
wineboot-development
# Notepad shows up?
wine-development notepad
TODO: autopkgtest



Upload package to mentors.debian.org

You need a mentors.d.o account (matching your email address in changelog).
If all required files are in the same folder upload with:
Code:
dput mentors \
  khronos-api_0~svn29577-2~bpo8+1_amd64.changes \
  wine-development_1.7.50-1~bpo8+1_amd64.changes
Check the packages page.
Subscribe to comment notification.
Posted in Uncategorized
Views 1538 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 06:54 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration