Learning how to make a GhostBSD Package from 4 files
https://docs.freebsd.org/en/books/porters-handbook/quick-porting/ Quick Porting chapter 3
https://docs.freebsd.org/en/books/porters-handbook/index.html Index to Handbook
https://man.freebsd.org/cgi/man.cgi?query=pkg-create&sektion=8&format=html pkg-create manuel to read about keywords,
-- a utility for creating software package distributions
pkg info -R gbi >gbi_pkg-plist.txt
name: "gbi"origin: "sysutils/gbi"version: "10.0.1"comment: "GBI is the GhostBSD front end user interface for pc-sysinstall."maintainer: "ericturgeon@ghostbsd.org"www: "https://github.com/GhostBSD/gbi/"abi: "FreeBSD:13:amd64"Pkpkgarch: "freebsd:13:x86:64"prefix: "/usr/local"flatsize: 2279953timestamp: 1684522894licenselogic: "single"licenses: ["BSD"]desc: "GBI is the GhostBSD front end user interface for pc-sysinstall.\n\nWWW: https://github.com/GhostBSD/gbi"deps: {pc-sysinstall: {origin: "sysutils/pc-sysinstall",version: "2022060400,1"},python39: {origin: "lang/python39",version: "3.9.16_2"},py39-setuptools: {origin: "devel/py-setuptools",version: "63.1.0"},py39-gobject3: {origin: "devel/py-gobject3",version: "3.42.2"},glib: {origin: "devel/glib20",version: "2.76.2,2"},gettext-runtime: {origin: "devel/gettext-runtime",version: "0.21.1"}}categories: ["sysutils"]annotations: {FreeBSD_version: "1302505",repo_type: "binary",repository: "GhostBSD"}files: {/usr/local/bin/gbi: "1$aa1ef29dd10b5d78f68ec89f62ea0c074b215b8dcc14f5c8d04d121349dfb596",/usr/local/lib/gbi/addUser.py: "1$8430e79bd5b5778795aa7cea96abb2136e8b2083783de6cebc2b0ad1fb82a73e",/usr/local/lib/gbi/backend-query/detect-laptop.sh: "1$cf2a8eb27d8ceb1760d2035b1f6e9a33b2e53a01b4877dfc23df130daff5d973",/usr/local/lib/gbi/backend-query/detect-nics.sh: "1$62f947c2501f028b2e42f67dbabe8eacea6ffb64b196b69198569142ea31aa91",/usr/local/lib/gbi/backend-query/detect-sheme.sh: "1$3b95196571edb2de0565f205eef1de7ed61cd3d489dc6db53b74835b1eab2053",/usr/local/lib/gbi/backend-query/detect-vmware.sh: "1$df8dfeafdacb89a8e028c187683799ce5c60dc93f7f846e6b2316ef4d670412b",/usr/local/lib/gbi/backend-query/detect-wifi.sh: "1$31d5fb0fc47e8b808fe679147cb595f2e94c2b090a89b0eef7cd7ec18be488fa",/usr/local/lib/gbi/backend-query/disk-info.sh: "1$67fd0b27749af86030fd339c9276010798fb0617e2c978b683a1490d08882f7b",/usr/local/lib/gbi/backend-query/disk-label.sh: "1$048cb7ce79c1f76b243ef43f01656403c50efcc1dc5fbab5ab0eaa12ee812a8c",/usr/local/lib/gbi/backend-query/disk-list.sh: "1$f8c962e20587cfe79858511ae18314c635f4d238a8653e6780678b183dcd7f0a",/usr/local/lib/gbi/backend-query/disk-part.sh: "1$968f79125fd0daf8b6705bc0b8c1ed19ffdc227e6359c2aff473e7dda361f678",/usr/local/lib/gbi/backend-query/enable-net.sh: "1$463d5427836047ff63c0fe1150055fcc5e4f3a6a4e50b3f2fdf090b6ce063653",/usr/local/lib/gbi/backend-query/list-components.sh: "1$1ad02d8a007a3ae5e41333cd13be5f9e20fc5b4ab1a65bb76769a0aeb9836772",/usr/local/lib/gbi/backend-query/list-rsync-backups.sh: "1$81c6fe36e17a5300ca2be42c584407f97275e41e7c9652c47b3ab1e16aeacb29",/usr/local/lib/gbi/backend-query/list-tzones.sh: "1$bbd4f04026305f74f8961081d9cfd89335cfcc4b57e2d34c4f4c49294d2f6be4",/usr/local/lib/gbi/backend-query/query-langs.sh: "1$de0fbc9abce793d530c7463a2762dbff1a7e654e15c888229e8f5c0985832b9f",/usr/local/lib/gbi/backend-query/send-logs.sh: "1$2012eb08e8603e3cc910ab4a1c96c20c09b80130f20e92e9cd2ddc096126590d",/usr/local/lib/gbi/backend-query/setup-ssh-keys.sh: "1$9f7b484d0322b7df12226fe2512133023a3a392931457cafcda70bcfc92b42a4",/usr/local/lib/gbi/backend-query/sys-mem.sh: "1$2cde7eb6affdf3927913eda91dd5d2726a34d24fe55256e80540fe2b5e113533",/usr/local/lib/gbi/backend-query/test-live.sh: "1$d2d8dbe78d807464f5070b5095345ffc21bbd657564196fee7401233675b4f11",/usr/local/lib/gbi/backend-query/test-netup.sh: "1$b89736cc1f04c8a6354e9d66a6e9ab7920926a2e86c1caca0d5b78eb53c6b892",/usr/local/lib/gbi/backend-query/update-part-list.sh: "1$a016aa15a939b3ac9d0cf01500329c8e179454192a385dbba0c1dbc5c3c88b6a",/usr/local/lib/gbi/backend-query/xkeyboard-layouts.sh: "1$8078f210cf45df8e9c700384c46f74bd7253706727bad9d5adbf1172ba1a300b",/usr/local/lib/gbi/backend-query/xkeyboard-models.sh: "1$c957ce568feed18a61ee5632a4e438e51deee718b5b76103ac06c0cdd0764c50",/usr/local/lib/gbi/backend-query/xkeyboard-variants.sh: "1$2bb8bcbee983c0bcc6a8d26be0b83ea059876926e2f9850935541db7dbb22105",/usr/local/lib/gbi/boot_manager.py: "1$d4fbb3c6d5506d515fccc78ffc9d25d584dd7d48330c15bb818257471c5decec",/usr/local/lib/gbi/create_cfg.py: "1$69631856e8214f4ff21eba6ddfe91b08dda7a72bcd4ff8280e1d47dbd59e77dd",/usr/local/lib/gbi/disk.png: "1$08f38c24a644297f767e3db3030d7d537e3f6ff1a58b56788255ebf4e7df7175",/usr/local/lib/gbi/end.py: "1$914583407fa3e0afd7c3ed2b9254ea0fde9a177ed683814c28d8c32c92a2e511",/usr/local/lib/gbi/error.py: "1$42e0c9fa058a74e5c7bcd0a6d8b8ce8954da046efa9f9e87d1da8d4aae13f73e",/usr/local/lib/gbi/gbiWindow.py: "1$62800424966e328fa5adab61d22987b22a345100074b5acb7c587a15adb29047",/usr/local/lib/gbi/ghostbsd-style.css: "1$ba893be922bf928578b5b32d54b41941e0f1020fee397ca4fe8eb2d1baa30657",/usr/local/lib/gbi/image/G_logo.gif: "1$ce8580130f5f8ae41a463a3cb20545a700904dbb90b9a97250dd3c26ae849a97",/usr/local/lib/gbi/image/disk.png: "1$08f38c24a644297f767e3db3030d7d537e3f6ff1a58b56788255ebf4e7df7175",/usr/local/lib/gbi/image/install-gbsd.png: "1$1306fbfabe2de5bbdf5dc9f63d7301765c7af58530d926506ddd99d9b731671c",/usr/local/lib/gbi/image/installation.jpg: "1$6319f4725a12fc0567983a75ff2091eba675d1ce4299f031dbd77efba2e1970a",/usr/local/lib/gbi/image/laptop.png: "1$796981d0a38cd49c809a3972a77dd041331d525d837809741fdd53a10b1a23ac",/usr/local/lib/gbi/image/logo.png: "1$74097267a1343a04fead3da789ae47d9f1fe0c96f79d7978c1f98bef668dd2bb",/usr/local/lib/gbi/install.py: "1$bb236088cace166249304303e387d15a3381e89984f9b7823c4caa1c52466bd6",/usr/local/lib/gbi/installType.py: "1$353a93e494c33b1658679140b7df291d67bc08345cec6f42e153c332536fbf0c",/usr/local/lib/gbi/keyboard.py: "1$624125905b434027977133f3e721c1703e347e580aa874deb712f3cfa5d70905",/usr/local/lib/gbi/language.py: "1$eec145c139a715e736835c609eb244546c6f625b9c450f5823160305a397dc30",/usr/local/lib/gbi/laptop.png: "1$796981d0a38cd49c809a3972a77dd041331d525d837809741fdd53a10b1a23ac",/usr/local/lib/gbi/network_setup.py: "1$fc469825d917856be27be01b327faed6e79732bfa27e96df6e4b95738971488c",/usr/local/lib/gbi/partition.py: "1$bf2e0454fa057ca195bf67bab988267555dc6dacda0f5464b934533d3ab38e5d",/usr/local/lib/gbi/partition_handler.py: "1$ae26141cd594428d74051647ec86dd93516359c73d90ce00af15cb4659cf6c9b",/usr/local/lib/gbi/root.py: "1$833491c3131650d9f852b564ba2020d5f79d46b84258c15a5da5968ae6216664",/usr/local/lib/gbi/sys_handler.py: "1$6b3947717899a9a12fa5b6fd52bdf004406a6622d39e4e39687b10265f613841",/usr/local/lib/gbi/timezone.py: "1$cd7ca41dda59e95eaa6e2366e8789650a318a7c6399b7eb571040274d56607bb",/usr/local/lib/gbi/use_ufs.py: "1$69b13d640e3e3289a19a693d78ed93df8b1454c9b2d7e60bc9add5b0cbf6ca00",/usr/local/lib/gbi/use_zfs.py: "1$0755fd9e51bcf31860915f99663880a7d63febe4defb874d51d46a4efcd40770",/usr/local/lib/gbi/welcome_live.py: "1$b78457a1f72e61aaff0eeb49191923b7d496a4c525a592bf504521b8716f1403",/usr/local/lib/python3.9/site-packages/gbi-10.0.1-py3.9.egg-info/PKG-INFO: "1$c17f3b69109c5be511afd97c4bddaaa196b29ecd585c486c85b81f901b7ab878",/usr/local/lib/python3.9/site-packages/gbi-10.0.1-py3.9.egg-info/SOURCES.txt: "1$460bec5900a916ddea38277ca379948f15395c07cc135e54729e010f3a360b0d",/usr/local/lib/python3.9/site-packages/gbi-10.0.1-py3.9.egg-info/dependency_links.txt: "1$01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b",/usr/local/lib/python3.9/site-packages/gbi-10.0.1-py3.9.egg-info/top_level.txt: "1$6d861f7d1e52167d1b3dcd794fd3c6fda21a322bd384169d28902337d35657f1",/usr/local/share/applications/gbi.desktop: "1$6f51124b4995f92d9b2721b17f5c5c840361bbd9578b850ae41df05905d571ed",/usr/local/share/licenses/gbi-10.0.1/BSD: "1$4597cb21654b285b2c8da70828be06ddddc91ba2e6ec2a5a0ed1e0f4bb9edcbe",/usr/local/share/licenses/gbi-10.0.1/LICENSE: "1$6e509b20f1447081e900978241deac3fd72de237ea9e04cc8e070e884feef140",/usr/local/share/licenses/gbi-10.0.1/catalog.mk: "1$16225d7a1308f986d98eae737cd9a0c664b3f0325811c4826cc31c09ccd0e6b4"}scripts: {install: "#!/bin/sh\n\ncase \"$2\" in\n PRE-INSTALL)\n if [ ! -d /root/Desktop ] ; then\n mkdir -p /root/Desktop\n fi\n ;;\n POST-INSTALL)\n cp /usr/local/share/applications/gbi.desktop /root/Desktop/gbi.desktop\n ;;\nesac\n\nexit 0"}
https://docs.freebsd.org/en/books/porters-handbook/plist/ Read about plist
Terminal commands to use for creating a "port" or "pkg"
sudo pkg install ports
Updating GhostBSD repository catalogue...
GhostBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
ports: 23.05.28
Number of packages to be installed: 1
The process will require 413 MiB more space.
54 MiB to be downloaded.
Proceed with this action? [y/N]: y
[1/1] Fetching ports-23.05.28.pkg: 658% 47 MiB 7.5MB/s 00:01
Checking integrity... done (0 conflicting)
[1/1] Installing ports-23.05.28...
[1/1] Extracting ports-23.05.28: 69%
pkg: Fail to extract /usr/ports/misc/opencyc/pkg-plist from package: Write error
[1/1] Extracting ports-23.05.28: 100%
$
GhostBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
ports: 23.05.28
Number of packages to be installed: 1
The process will require 413 MiB more space.
54 MiB to be downloaded.
Proceed with this action? [y/N]: y
[1/1] Fetching ports-23.05.28.pkg: 658% 47 MiB 7.5MB/s 00:01
Checking integrity... done (0 conflicting)
[1/1] Installing ports-23.05.28...
[1/1] Extracting ports-23.05.28: 69%
pkg: Fail to extract /usr/ports/misc/opencyc/pkg-plist from package: Write error
[1/1] Extracting ports-23.05.28: 100%
$
# cd /usr/ports/ports-mgmt/portmaster
# make install clean
http://lastsummer.de/creating-custom-packages-on-freebsd/ LastSummer from 2014, gives that basic missing details I needed.
I used these shell scripts to create a
package for GURU.
https://github.com/opnsense/tools
https://github.com/freebsd/pkg/blob/master/README.md
EerieLinux Wordpress does a complete job of explaining Pkg and Synth.
https://eerielinux.wordpress.com/2017/08/30/freebsd-package-management-with-pkg-12/
https://eerielinux.wordpress.com/2017/09/10/freebsd-package-management-with-pkg-22/
https://github.com/patmaddox/home/tree/f1d30c2ea5c4b64d841774e320d76f7f13e91c7b/examples/pkg-create-example Simple Pkg Example
https://github.com/freebsd/pkg#manifest Good examples of Manifest.in file
https://eerielinux.wordpress.com/2021/05/25/freebsd-package-building-pt-1-introduction-and-test-system/
https://eerielinux.wordpress.com/2021/05/30/freebsd-package-building-pt-2-basic-synth/ Synth setup and use
https://eerielinux.wordpress.com/2020/11/01/my-first-freebsd-port-castor/
Freebsd Narkive gives a simple explanation about using quotes "3.0"
https://freebsd-questions.freebsd.narkive.com/Xv1kc8zE/creating-a-pkg
More commands to execute, like install portlint, poudriere
$ cat +MANIFEST
name: mypackage
version: "1.0_5"
origin: sysutils/mypackage
comment: "automates stuff"
desc: "automates tasks which can also be undone later"
maintainer: john@doe.it
www: https://doe.it
prefix: /
deps: {
}
$ pwd
/tmp/stage
$ sudo pkg install portlint
Password:
Updating GhostBSD repository catalogue...
GhostBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
portlint: 2.20.0
Number of packages to be installed: 1
33 KiB to be downloaded.
Proceed with this action? [y/N]: y
[1/1] Fetching portlint-2.20.0.pkg: 100% 33 KiB 33.6kB/s 00:01
Checking integrity... done (0 conflicting)
[1/1] Installing portlint-2.20.0...
[1/1] Extracting portlint-2.20.0: 100%
$ portlint
/usr/ports/Mk/bsd.sites.mk: No such file or directory at /usr/local/bin/portlint line 203.
$
$ sudo pkg install poudriere
Updating GhostBSD repository catalogue...
GhostBSD repository is up to date.
All repositories are up to date.
The following 3 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
dialog4ports: 0.1.6_1
freebsd-release-manifests: 20230407
poudriere: 3.3.7_1
Number of packages to be installed: 3
The process will require 2 MiB more space.
750 KiB to be downloaded.
Proceed with this action? [y/N]: y
[1/3] Fetching poudriere-3.3.7_1.pkg: 100% 730 KiB 249.2kB/s 00:03
[2/3] Fetching freebsd-release-manifests-20230407.pkg: 100% 9 KiB 9.2kB/s 00:01
[3/3] Fetching dialog4ports-0.1.6_1.pkg: 100% 11 KiB 11.3kB/s 00:01
Checking integrity... done (0 conflicting)
[1/3] Installing freebsd-release-manifests-20230407...
[1/3] Extracting freebsd-release-manifests-20230407: 100%
[2/3] Installing dialog4ports-0.1.6_1...
[2/3] Extracting dialog4ports-0.1.6_1: 100%
[3/3] Installing poudriere-3.3.7_1...
[3/3] Extracting poudriere-3.3.7_1: 100%
$ l
$ mkdir /usr/local/lib/guru
mkdir: /usr/local/lib/guru: Permission denied
$ sudo mkdir /usr/local/lib/guru
Password:
$ $ pwd
/usr/home/fred/guru/GhostBSD_apps
$ sudo mkdir /tmp/stage/usr/local/share/applications
mkdir: /tmp/stage/usr/local/share: No such file or directory
$ sudo mkdir -p /tmp/stage/usr/local/share/applications
$ sudo mkdir -p /tmp/stage/usr/local/lib/guru
$ sudo cp Generate_User_Report.desktop /tmp/stage/usr/local/share/applications
$ sudo cp * /tmp/stage/usr/local/lib/guru
# remove copied files from temporary directory "guru"
$ sudo rm -i /usr/local/lib/guru/*
remove /usr/local/lib/guru/+MANIFEST? y
remove /usr/local/lib/guru/+MANIFEST2? y
remove /usr/local/lib/guru/Generate_User_Report.desktop? y
remove /usr/local/lib/guru/Makefile? y
remove /usr/local/lib/guru/README.md? y
remove /usr/local/lib/guru/Report_fred-ghostbsd-pc1_2020-04-05_example.txt? y
remove /usr/local/lib/guru/User_Report.py? y
remove /usr/local/lib/guru/User_Report.sh? y
remove /usr/local/lib/guru/applets-screenshooter.png? y
remove /usr/local/lib/guru/guru-1.0_1.pkg? y
remove /usr/local/lib/guru/guru_MANIFEST? y
remove /usr/local/lib/guru/pkg-descr? y
remove /usr/local/lib/guru/pkg-message? y
remove /usr/local/lib/guru/pkg_create_examples.txt? y
sudo rmdir /usr/local/lib/guru
Generate a +MANIFEST file for pkg create use
Directory Path name for ports-mgmt/portmaster
https://cgit.freebsd.org/ports/tree/ports-mgmt/portmaster/
Comments
Post a Comment