Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If we install the package as is (in the current environment) the BASEDIR is "/" and we just clear it, but if we will install it to a zone at bootstrap stage it could look like:

Code Block
titleBASEDIR
server# apt -R /zones/du3p03/root reprepro

BASEDIR will be /zones/du3p01/root in the postscript.

du3/components/<package>

When the porting has done and all packages built you should place it into the du3 repo. Create a directory (usuali usualy by the source package name), in our examples it is apache2 and/or jdupes.

Code Block
titlemake directory
du3p03% mkdir -p du3/components/jdupes

Create the Makefile to build the package by CI (jenkins):

Code Block
titleMakefile
du3p01% cat du3/components/jdupes/Makefile 
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright (c) 2020 DilOS Team <dilos@dilos.org>
#
include ../../make-rules/shared-macros.mk

COMPONENT_NAME= jdupes

include ../../make-rules/deb_src2.mk

#
build:
	@echo "Nothing build"

install:
	@echo "Nothing install"

clean:
	$(RM) -r $(BUILD_DIR)
#	$(RM) *.changes
#	$(RM) *.deb

clobber: clean

test: $(NO_TESTS)

Copy the whole debian directory from the package tree to the component repo directory, add it to git, commit it and create a PR (pull request).

Code Block
titledebian copy
du3p03% cp -R <jdupes-version>/debian du3/componens/jdupes

produce a new source

To build a source package do the command from the main package tree:

Code Block
titlebuild source package
du3p03% sudo dpkg-buildpackage -d -S -us -uc -sa
dpkg-buildpackage: info: source package jdupes
dpkg-buildpackage: info: source version 1.18.1-1~bpo10+1+dilos1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by DilOS Team <dilos@dilos.org>
 dpkg-source --before-build .
dpkg-source: warning: can't parse dependency tree:native
dpkg-source: warning: can't parse dependency tree:native
 debian/rules clean
dh clean
   dh_auto_clean
        make -j1 distclean
make[1]: Entering directory '/export/home/denis/projects/dilos/porting/jdupes-1.18.1'
rm -f jdupes.o jody_paths.o jody_sort.o jody_win_unicode.o jody_strtoepoch.o string_malloc.o jody_cacheinfo.o act_deletefiles.o act_linkfiles.o act_printmatches.o act_summarize.o act_printjson.o xxhash.o  act_dedupefiles.o jdupes-standalone build_date.h jdupes jdupes.exe *~ *.gcno *.gcda *.gcov
rm -f *.pkg.tar.xz
rm -f -r jdupes-*-win*/ jdupes-*-win*.zip
rm -f -r jdupes-*-mac*/ jdupes-*-mac*.zip
make[1]: Leaving directory '/export/home/denis/projects/dilos/porting/jdupes-1.18.1'
   dh_clean
 dpkg-source -b .
dpkg-source: warning: can't parse dependency tree:native
dpkg-source: warning: can't parse dependency tree:native
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building jdupes using existing ./jdupes_1.18.1.orig.tar.gz
dpkg-source: info: building jdupes in jdupes_1.18.1-1~bpo10+1+dilos1.debian.tar.xz
dpkg-source: info: building jdupes in jdupes_1.18.1-1~bpo10+1+dilos1.dsc
 dpkg-genbuildinfo --build=source
dpkg-genbuildinfo: warning: File::FcntlLock not available; using flock which is not NFS-safe
 dpkg-genchanges -sa --build=source >../jdupes_1.18.1-1~bpo10+1+dilos1_source.changes
dpkg-genchanges: info: including full source code in upload
 dpkg-source --after-build .
dpkg-source: warning: can't parse dependency tree:native
dpkg-source: warning: can't parse dependency tree:native
dpkg-buildpackage: info: full upload (original source is included)
du3p03% 

That's all.