Skip to content

Instantly share code, notes, and snippets.

@michaeljs1990
Created April 10, 2016 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaeljs1990/45a5de9d2e9ff8abd8458775837cbfbc to your computer and use it in GitHub Desktop.
Save michaeljs1990/45a5de9d2e9ff8abd8458775837cbfbc to your computer and use it in GitHub Desktop.
example dpkg-buildpackage output
dpkg-buildpackage: source package mylittledeb
dpkg-buildpackage: source version 0.0.1-1
dpkg-buildpackage: source distribution trusty
dpkg-buildpackage: source changed by root <root@unknown>
dpkg-buildpackage: host architecture amd64
dpkg-source --before-build mylittledeb
debian/rules clean
dh clean
dh_testdir
dh_auto_clean
make -j1 clean
make[1]: Entering directory `/root/mylittledeb'
rm hello || true
rm: cannot remove ‘hello’: No such file or directory
make[1]: Leaving directory `/root/mylittledeb'
dh_clean
rm -f debian/mylittledeb.substvars
rm -f debian/mylittledeb.*.debhelper
rm -rf debian/mylittledeb/
rm -f debian/*.debhelper.log
rm -f debian/files
find . \( \( -type f -a \
\( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
-o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
-o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
-o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \
\) -exec rm -f {} + \) -o \
\( -type d -a -name autom4te.cache -prune -exec rm -rf {} + \) \)
rm -f *-stamp
dpkg-source -b mylittledeb
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building mylittledeb using existing ./mylittledeb_0.0.1.orig.tar.xz
dpkg-source: info: building mylittledeb in mylittledeb_0.0.1-1.debian.tar.gz
dpkg-source: info: building mylittledeb in mylittledeb_0.0.1-1.dsc
debian/rules build
dh build
dh_testdir
dh_auto_configure
dh_auto_build
make -j1
make[1]: Entering directory `/root/mylittledeb'
gcc hello.c -o hello
make[1]: Leaving directory `/root/mylittledeb'
dh_auto_test
debian/rules binary
dh binary
dh_testroot
dh_prep
rm -f debian/mylittledeb.substvars
rm -f debian/mylittledeb.*.debhelper
rm -rf debian/mylittledeb/
dh_auto_install
install -d debian/mylittledeb
dh_install
install -d debian/mylittledeb//usr/bin
cp -a ./hello debian/mylittledeb//usr/bin/
dh_installdocs
install -g 0 -o 0 -d debian/mylittledeb/usr/share/doc/mylittledeb
chown -R 0:0 debian/mylittledeb/usr/share/doc
chmod -R go=rX debian/mylittledeb/usr/share/doc
chmod -R u\+rw debian/mylittledeb/usr/share/doc
install -g 0 -o 0 -m 644 -p debian/README.Debian debian/mylittledeb/usr/share/doc/mylittledeb/README.Debian
install -g 0 -o 0 -m 644 -p debian/copyright debian/mylittledeb/usr/share/doc/mylittledeb/copyright
dh_installchangelogs
install -o 0 -g 0 -p -m644 debian/changelog debian/mylittledeb/usr/share/doc/mylittledeb/changelog.Debian
dh_perl
dh_link
dh_compress
cd debian/mylittledeb
chmod a-x usr/share/doc/mylittledeb/changelog.Debian
gzip -9nf usr/share/doc/mylittledeb/changelog.Debian
cd '/root/mylittledeb'
dh_fixperms
find debian/mylittledeb -print0 2>/dev/null | xargs -0r chown --no-dereference 0:0
find debian/mylittledeb ! -type l -print0 2>/dev/null | xargs -0r chmod go=rX,u+rw,a-s
find debian/mylittledeb/usr/share/doc -type f ! -regex 'debian/mylittledeb/usr/share/doc/[^/]*/examples/.*' -print0 2>/dev/null | xargs -0r chmod 644
find debian/mylittledeb/usr/share/doc -type d -print0 2>/dev/null | xargs -0r chmod 755
find debian/mylittledeb/usr/share/man debian/mylittledeb/usr/man/ debian/mylittledeb/usr/X11*/man/ -type f -print0 2>/dev/null | xargs -0r chmod 644
find debian/mylittledeb -perm -5 -type f \( -name '*.so.*' -or -name '*.so' -or -name '*.la' -or -name '*.a' \) -print0 2>/dev/null | xargs -0r chmod 644
find debian/mylittledeb/usr/include -type f -print0 2>/dev/null | xargs -0r chmod 644
find debian/mylittledeb/usr/share/applications -type f -print0 2>/dev/null | xargs -0r chmod 644
find debian/mylittledeb -perm -5 -type f \( -name '*.cmxs' \) -print0 2>/dev/null | xargs -0r chmod 644
find debian/mylittledeb/usr/lib/perl5 debian/mylittledeb/usr/share/perl5 -type f -perm -5 -name '*.pm' -print0 2>/dev/null | xargs -0r chmod a-X
find debian/mylittledeb/usr/bin -type f -print0 2>/dev/null | xargs -0r chmod a+x
find debian/mylittledeb/usr/lib -type f -name '*.ali' -print0 2>/dev/null | xargs -0r chmod uga-w
dh_strip
strip --remove-section=.comment --remove-section=.note debian/mylittledeb/usr/bin/hello
dh_makeshlibs
rm -f debian/mylittledeb/DEBIAN/shlibs
dh_shlibdeps
install -o 0 -g 0 -d debian/mylittledeb/DEBIAN
dpkg-shlibdeps -Tdebian/mylittledeb.substvars debian/mylittledeb/usr/bin/hello
dh_installdeb
dh_gencontrol
echo misc:Depends= >> debian/mylittledeb.substvars
dpkg-gencontrol -ldebian/changelog -Tdebian/mylittledeb.substvars -Pdebian/mylittledeb
chmod 644 debian/mylittledeb/DEBIAN/control
chown 0:0 debian/mylittledeb/DEBIAN/control
dh_md5sums
(cd debian/mylittledeb >/dev/null ; find . -type f ! -regex './DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums) >/dev/null
chmod 644 debian/mylittledeb/DEBIAN/md5sums
chown 0:0 debian/mylittledeb/DEBIAN/md5sums
dh_builddeb
dpkg-deb --build debian/mylittledeb ..
dpkg-deb: building package `mylittledeb' in `../mylittledeb_0.0.1-1_amd64.deb'.
signfile mylittledeb_0.0.1-1.dsc
gpg: skipped "root <root@unknown>": secret key not available
gpg: [stdin]: clearsign failed: secret key not available
dpkg-genchanges >../mylittledeb_0.0.1-1_amd64.changes
dpkg-genchanges: including full source code in upload
dpkg-source --after-build mylittledeb
dpkg-buildpackage: full upload (original source is included)
dpkg-buildpackage: warning: failed to sign .dsc and .changes file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment